Puppet Class: requesttracker::config

Defined in:
modules/requesttracker/manifests/config.pp

Overview

sets up config files for a Wikimedia install of Request Tracker (RT)



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'modules/requesttracker/manifests/config.pp', line 3

class requesttracker::config {

    $rtconf = '# This file is for the command-line client, /usr/bin/rt.\n\nserver http://localhost/rt\n'

    file { '/etc/request-tracker4/RT_SiteConfig.d/50-debconf.pm':
        require => Package['request-tracker4'],
        content => template('requesttracker/50-debconf.erb'),
        notify  => Exec['update-rt-siteconfig'];
    }

    file { '/etc/request-tracker4/RT_SiteConfig.d/51-dbconfig-common.pm':
        require => Package['request-tracker4'],
        content => template('requesttracker/51-dbconfig-common.erb'),
        notify  => Exec['update-rt-siteconfig'];
    }

    file { '/etc/request-tracker4/RT_SiteConfig.d/80-wikimedia.pm':
        require => Package['request-tracker4'],
        source  => 'puppet:///modules/requesttracker/80-wikimedia',
        notify  => Exec['update-rt-siteconfig'];
    }

    file { '/etc/request-tracker4/RT_SiteConfig.pm':
        require => Package['request-tracker4'],
        owner   => 'root',
        group   => 'www-data',
        mode    => '0440';
    }

    file { '/etc/request-tracker4/rt.conf':
        require => Package['request-tracker4'],
        content => $rtconf;
    }

    exec { 'update-rt-siteconfig':
        command     => '/usr/sbin/update-rt-siteconfig-4',
        subscribe   => File[
                        '/etc/request-tracker4/RT_SiteConfig.d/50-debconf.pm',
                        '/etc/request-tracker4/RT_SiteConfig.d/51-dbconfig-common.pm',
                        '/etc/request-tracker4/RT_SiteConfig.d/80-wikimedia.pm'
                        ],
        require     => Package[
                        'request-tracker4',
                        'rt4-db-mysql',
                        'rt4-clients'
                        ],
        refreshonly => true,
        notify      => Service['apache2'];
    }

}