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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/nagios/files/nagios.cfg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/nagios/manifests/server.pp
===================================================================
--- a/modules/nagios/manifests/server.pp
+++ b/modules/nagios/manifests/server.pp
@@ -50,10 +50,25 @@
require => Package['php5-cgi']
}
+ # See http://hub.eyeo.com/issues/4612#note-2
+ if $::operatingsystem == 'Debian' {
+ exec {'override-nagios-dpkg-stats':
+ command => 'dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw && dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3',
mathias 2017/10/25 10:31:47 Please use shellquote() to aggregate the $command
f.nicolaisen 2017/10/25 14:36:09 Acknowledged.
+ unless => 'dpkg-statoverride --list nagios www-data 2710 /var/lib/nagios3/rw && dpkg-statoverride --list nagios nagios 751 /var/lib/nagios3',
+ path => ["/usr/bin/", "/bin/"],
+ user => root,
+ notify => Service['nagios3'],
+ require => Package['nagios3'],
+ }
+ }
+
service {'nagios3':
ensure => running,
enable => true,
- require => [Package['nagios3'], Package['pnp4nagios']]
+ require => [
+ Package['nagios3'],
+ Package['pnp4nagios'],
+ ],
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.
}
service {'apache2':
« 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