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

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

Issue 29338054: Issue 3638 - Use adblockplus::host to provide nagios_host definitions (Closed)
Patch Set: Created March 10, 2016, 12:30 a.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/adblockplus/manifests/host/monitoringserver.pp ('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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 require => Package['nagios3'], 152 require => Package['nagios3'],
153 notify => Service['nagios3'] 153 notify => Service['nagios3']
154 } 154 }
155 155
156 create_resources(nagios_contact, $contacts) 156 create_resources(nagios_contact, $contacts)
157 create_resources(nagios_contactgroup, $contactgroups) 157 create_resources(nagios_contactgroup, $contactgroups)
158 create_resources(nagios_command, $commands) 158 create_resources(nagios_command, $commands)
159 create_resources(nagios_service, $services) 159 create_resources(nagios_service, $services)
160 create_resources(nagios_host, $hosts) 160 create_resources(nagios_host, $hosts)
161 create_resources(nagios_hostgroup, $hostgroups) 161 create_resources(nagios_hostgroup, $hostgroups)
162
163 $nagios_generic = hiera('servers')
164 create_resources(nagios::server::generic_host, $nagios_generic)
165
166 define generic_host(
167 $ip,
168 $ssh_public_key = undef,
169 $role = undef,
170 $dns = undef,
171 $groups = [],
172 ) {
173
174 if $dns == undef {
175 $fqdn_name = join([$name, $nagios::server::zone], '.')
176 } else {
177 $fqdn_name = $dns
178 }
179
180 nagios_host {$fqdn_name:
181 use => 'generic-host',
182 hostgroups => $groups,
183 }
184 }
185 } 162 }
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/host/monitoringserver.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld