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

Side by Side 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.
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 | « no previous file | 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 ) { 9 ) {
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 $fqdn_name = join([$name, $nagios::server::zone], '.') 180 $fqdn_name = join([$name, $nagios::server::zone], '.')
181 } else { 181 } else {
182 $fqdn_name = $dns 182 $fqdn_name = $dns
183 } 183 }
184 184
185 nagios_host {$fqdn_name: 185 nagios_host {$fqdn_name:
186 use => 'generic-host', 186 use => 'generic-host',
187 hostgroups => $groups, 187 hostgroups => $groups,
188 } 188 }
189 } 189 }
190
191 # This is a workaround removing "member" directives with absent values,
192 # which are created by Puppet when configuring a hostgroup without any
193 # explicit members (which is a valid scenario), but not properly parsed
194 # during the provisioning process:
195 Nagios_hostgroup <| |> ~>
196 exec {'nagios-hostgroup-fixup':
197 command => shellquote('sed', '-i',
mathias 2015/03/18 11:26:36 I'd be glad if anybody could point out a better so
198 '/^define\shostgroup\s{/,/^}/ { /^\s*members\s*$/d }',
199 '/etc/nagios3/conf.d/hostgroups.cfg'),
200 path => '/bin',
201 refreshonly => true,
202 }
190 } 203 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld