Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/nagios/manifests/server.pp

Issue 29587724: #4612 - Enable External Commands in Nagios (Closed) Base URL: https://hg1/infrastructure
Left Patch Set: nicer dpkg_statoverride Created Oct. 25, 2017, 2:35 p.m.
Right Patch Set: address acks from #6 Created Oct. 25, 2017, 3:10 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/nagios/files/nagios.cfg ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld