Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 class nagios::server( | 1 class nagios::server( |
2 $directory = hiera('nagios::server::directory', '/var/lib/nagios3'), | 2 $directory = hiera('nagios::server::directory', '/var/lib/nagios3'), |
mathias
2017/10/25 16:53:42
This technique is not necessary any more, we've be
f.nicolaisen
2017/10/26 07:45:04
Noted for next time!
| |
3 $domain, | 3 $domain, |
4 $certificate, | 4 $certificate, |
5 $private_key, | 5 $private_key, |
6 $is_default=false, | 6 $is_default=false, |
7 $htpasswd_source, | 7 $htpasswd_source, |
8 $admins, | 8 $admins, |
9 $zone, | 9 $zone, |
10 $contacts = hiera('nagios::server::contacts', {}), | 10 $contacts = hiera('nagios::server::contacts', {}), |
11 $contactgroups = hiera('nagios::server::contactgroups', {}), | 11 $contactgroups = hiera('nagios::server::contactgroups', {}), |
12 $commands = hiera('nagios::server::commands', {}), | 12 $commands = hiera('nagios::server::commands', {}), |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 } | 45 } |
46 | 46 |
47 spawn_fcgi::php_pool {'global': | 47 spawn_fcgi::php_pool {'global': |
48 ensure => present, | 48 ensure => present, |
49 socket => '/tmp/php-fastcgi.sock', | 49 socket => '/tmp/php-fastcgi.sock', |
50 children => '3', | 50 children => '3', |
51 require => Package['php5-cgi'] | 51 require => Package['php5-cgi'] |
52 } | 52 } |
53 | 53 |
54 # See http://hub.eyeo.com/issues/4612#note-2 | 54 # See http://hub.eyeo.com/issues/4612#note-2 |
55 if $::operatingsystem == 'Debian' { | 55 if $::osfamily == 'Debian' { |
mathias
2017/10/25 14:40:55
The condition should use $::osfamily, each associa
f.nicolaisen
2017/10/25 15:10:29
Acknowledged.
| |
56 | 56 |
57 $dpkg_statoverride = 'dpkg-statoverride' | 57 $dpkg_statoverride = 'dpkg-statoverride' |
58 $dpkg_options = shellquote(['nagios', 'nagios', '751', "$directory"]) | 58 $dpkg_options = shellquote(['nagios', 'nagios', '751', "$directory"]) |
59 $dpkg_options_rw = shellquote(['nagios', 'www-data', '2710', "$directory/rw" ]) | 59 $dpkg_options_rw = shellquote(['nagios', 'www-data', '2710', "$directory/rw" ]) |
60 | 60 |
61 exec {"$directory": | 61 exec {"$directory": |
62 command => "$dpkg_statoverride --update --add $dpkg_options", | 62 command => "$dpkg_statoverride --update --add $dpkg_options", |
63 unless => "$dpkg_statoverride --list $dpkg_options", | 63 unless => "$dpkg_statoverride --list $dpkg_options", |
64 path => ["/usr/bin/", "/bin/"], | 64 path => ["/usr/bin/", "/bin/"], |
65 user => root, | 65 user => root, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 notify => Service['nagios3'] | 188 notify => Service['nagios3'] |
189 } | 189 } |
190 | 190 |
191 create_resources(nagios_contact, $contacts) | 191 create_resources(nagios_contact, $contacts) |
192 create_resources(nagios_contactgroup, $contactgroups) | 192 create_resources(nagios_contactgroup, $contactgroups) |
193 create_resources(nagios_command, $commands) | 193 create_resources(nagios_command, $commands) |
194 create_resources(nagios_service, $services) | 194 create_resources(nagios_service, $services) |
195 create_resources(nagios_host, $hosts) | 195 create_resources(nagios_host, $hosts) |
196 create_resources(nagios_hostgroup, $hostgroups) | 196 create_resources(nagios_hostgroup, $hostgroups) |
197 } | 197 } |
LEFT | RIGHT |