| OLD | NEW | 
|---|
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|