| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 $authority, | 8 $zone, |
| 9 ) { | 9 ) { |
| 10 | 10 |
| 11 File { | 11 File { |
| 12 owner => 'root', | 12 owner => 'root', |
| 13 group => 'root', | 13 group => 'root', |
| 14 mode => 0644 | 14 mode => 0644 |
| 15 } | 15 } |
| 16 | 16 |
| 17 include nginx, 'spawn-fcgi' | 17 include nginx, 'spawn-fcgi' |
| 18 | 18 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 Nagios_command <| |> { | 117 Nagios_command <| |> { |
| 118 target => '/etc/nagios3/conf.d/commands.cfg', | 118 target => '/etc/nagios3/conf.d/commands.cfg', |
| 119 require => Package['nagios3'], | 119 require => Package['nagios3'], |
| 120 notify => [File['/etc/nagios3/conf.d/commands.cfg'], Service['nagios3']] | 120 notify => [File['/etc/nagios3/conf.d/commands.cfg'], Service['nagios3']] |
| 121 } | 121 } |
| 122 | 122 |
| 123 Nagios_host <| |> { | 123 Nagios_host <| |> { |
| 124 target => '/etc/nagios3/conf.d/hosts.cfg', | 124 target => '/etc/nagios3/conf.d/hosts.cfg', |
| 125 notify => [File['/etc/nagios3/conf.d/hosts.cfg'], Service['nagios3']] | 125 notify => [File['/etc/nagios3/conf.d/hosts.cfg'], Service['nagios3']] |
| 126 } | 126 } |
| 127 <- | 127 <- |
|
Wladimir Palant
2015/03/03 20:00:19
This change seems bogus: hosts.cfg can be written
mathias
2015/03/04 12:32:37
You're right regarding Nagios, but it's actually P
| |
| 128 Nagios_hostgroup <| |> { | 128 Nagios_hostgroup <| |> { |
| 129 target => '/etc/nagios3/conf.d/hostgroups.cfg', | 129 target => '/etc/nagios3/conf.d/hostgroups.cfg', |
| 130 require => Package['nagios3'], | 130 require => Package['nagios3'], |
| 131 notify => [File['/etc/nagios3/conf.d/hostgroups.cfg'], Service['nagios3']] | 131 notify => [File['/etc/nagios3/conf.d/hostgroups.cfg'], Service['nagios3']] |
| 132 } | 132 } |
| 133 | 133 |
| 134 Nagios_service <| |> { | 134 Nagios_service <| |> { |
| 135 target => '/etc/nagios3/conf.d/services.cfg', | 135 target => '/etc/nagios3/conf.d/services.cfg', |
| 136 require => Package['nagios3'], | 136 require => Package['nagios3'], |
| 137 notify => [File['/etc/nagios3/conf.d/services.cfg'], Service['nagios3']] | 137 notify => [File['/etc/nagios3/conf.d/services.cfg'], Service['nagios3']] |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 164 | 164 |
| 165 $nagios_hostgroups = hiera('nagios_hostgroups', {}) | 165 $nagios_hostgroups = hiera('nagios_hostgroups', {}) |
| 166 create_resources(nagios_hostgroup, $nagios_hostgroups) | 166 create_resources(nagios_hostgroup, $nagios_hostgroups) |
| 167 | 167 |
| 168 $nagios_generic = hiera('servers') | 168 $nagios_generic = hiera('servers') |
| 169 create_resources(nagios::server::generic_host, $nagios_generic) | 169 create_resources(nagios::server::generic_host, $nagios_generic) |
| 170 | 170 |
| 171 define generic_host( | 171 define generic_host( |
| 172 $ip, | 172 $ip, |
| 173 $ssh_public_key = undef, | 173 $ssh_public_key = undef, |
| 174 $role = undef, | 174 $role = undef, |
| 175 $dns = undef, | 175 $dns = undef, |
| 176 $groups = [], | 176 $groups = [], |
| 177 ) { | 177 ) { |
| 178 | 178 |
| 179 $fqdn_name = join([$name, $nagios::server::authority], ".") | 179 $fqdn_name = join([$name, $nagios::server::zone], '.') |
| 180 | 180 |
| 181 nagios_host {$fqdn_name: | 181 nagios_host {$fqdn_name: |
| 182 use => 'generic-host', | 182 use => 'generic-host', |
| 183 hostgroups => $groups, | 183 hostgroups => $groups, |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 } | 186 } |
| LEFT | RIGHT |