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, |
+ } |
} |