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

Unified Diff: modules/nagios/manifests/server.pp

Issue 6304894776508416: Issue 2160 - Ensure nagios_hostgroup() does not break reprovisioning (Closed)
Patch Set: Created March 17, 2015, 6:38 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 | « no previous file | 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
@@ -187,4 +187,17 @@
hostgroups => $groups,
}
}
+
+ # This is a workaround removing "member" directives with absent values,
+ # which are created by Puppet when configuring a hostgroup without any
+ # explicit members (which is a valid scenario), but not properly parsed
+ # during the provisioning process:
+ Nagios_hostgroup <| |> ~>
+ exec {'nagios-hostgroup-fixup':
+ command => shellquote('sed', '-i',
mathias 2015/03/18 11:26:36 I'd be glad if anybody could point out a better so
+ '/^define\shostgroup\s{/,/^}/ { /^\s*members\s*$/d }',
+ '/etc/nagios3/conf.d/hostgroups.cfg'),
+ path => '/bin',
+ refreshonly => true,
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld