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

Side by Side Diff: modules/nagios/manifests/server.pp

Issue 29587724: #4612 - Enable External Commands in Nagios (Closed) Base URL: https://hg1/infrastructure
Patch Set: Created Oct. 24, 2017, 9 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/nagios/files/nagios.cfg ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class nagios::server( 1 class nagios::server(
2 $domain, 2 $domain,
3 $certificate, 3 $certificate,
4 $private_key, 4 $private_key,
5 $is_default=false, 5 $is_default=false,
6 $htpasswd_source, 6 $htpasswd_source,
7 $admins, 7 $admins,
8 $zone, 8 $zone,
9 $contacts = hiera('nagios::server::contacts', {}), 9 $contacts = hiera('nagios::server::contacts', {}),
10 $contactgroups = hiera('nagios::server::contactgroups', {}), 10 $contactgroups = hiera('nagios::server::contactgroups', {}),
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 log => 'access_log_monitoring' 43 log => 'access_log_monitoring'
44 } 44 }
45 45
46 spawn_fcgi::php_pool {'global': 46 spawn_fcgi::php_pool {'global':
47 ensure => present, 47 ensure => present,
48 socket => '/tmp/php-fastcgi.sock', 48 socket => '/tmp/php-fastcgi.sock',
49 children => '3', 49 children => '3',
50 require => Package['php5-cgi'] 50 require => Package['php5-cgi']
51 } 51 }
52 52
53 # See http://hub.eyeo.com/issues/4612#note-2
54 if $::operatingsystem == 'Debian' {
55 exec {'override-nagios-dpkg-stats':
56 command => 'dpkg-statoverride --update --add nagios www-data 2710 /var/lib /nagios3/rw && dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagio s3',
mathias 2017/10/25 10:31:47 Please use shellquote() to aggregate the $command
f.nicolaisen 2017/10/25 14:36:09 Acknowledged.
57 unless => 'dpkg-statoverride --list nagios www-data 2710 /var/lib/nagios3/ rw && dpkg-statoverride --list nagios nagios 751 /var/lib/nagios3',
58 path => ["/usr/bin/", "/bin/"],
59 user => root,
60 notify => Service['nagios3'],
61 require => Package['nagios3'],
62 }
63 }
64
53 service {'nagios3': 65 service {'nagios3':
54 ensure => running, 66 ensure => running,
55 enable => true, 67 enable => true,
56 require => [Package['nagios3'], Package['pnp4nagios']] 68 require => [
69 Package['nagios3'],
70 Package['pnp4nagios'],
71 ],
f.nicolaisen 2017/10/25 10:01:12 Hm, I accidentally included this change. I was wor
f.nicolaisen 2017/10/25 14:36:09 Acknowledged.
57 } 72 }
58 73
59 service {'apache2': 74 service {'apache2':
60 ensure => stopped, 75 ensure => stopped,
61 enable => false, 76 enable => false,
62 require => Package['nagios3'], 77 require => Package['nagios3'],
63 before => Service['nagios3'] 78 before => Service['nagios3']
64 } 79 }
65 80
66 file {'/etc/nagios3/htpasswd.users': 81 file {'/etc/nagios3/htpasswd.users':
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 notify => Service['nagios3'] 176 notify => Service['nagios3']
162 } 177 }
163 178
164 create_resources(nagios_contact, $contacts) 179 create_resources(nagios_contact, $contacts)
165 create_resources(nagios_contactgroup, $contactgroups) 180 create_resources(nagios_contactgroup, $contactgroups)
166 create_resources(nagios_command, $commands) 181 create_resources(nagios_command, $commands)
167 create_resources(nagios_service, $services) 182 create_resources(nagios_service, $services)
168 create_resources(nagios_host, $hosts) 183 create_resources(nagios_host, $hosts)
169 create_resources(nagios_hostgroup, $hostgroups) 184 create_resources(nagios_hostgroup, $hostgroups)
170 } 185 }
OLDNEW
« no previous file with comments | « modules/nagios/files/nagios.cfg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld