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', {}), |
11 $commands = hiera('nagios::server::commands', {}), | 11 $commands = hiera('nagios::server::commands', {}), |
12 $services = hiera('nagios::server::services', {}), | 12 $services = hiera('nagios::server::services', {}), |
13 $hosts = hiera('nagios::server::hosts', {}), | 13 $hosts = hiera('nagios::server::hosts', {}), |
14 $hostgroups = hiera('nagios::server::hostgroups', {}), | 14 $hostgroups = hiera('nagios::server::hostgroups', {}), |
15 ) { | 15 ) { |
16 | 16 |
17 File { | 17 File { |
18 owner => 'root', | 18 owner => 'root', |
19 group => 'root', | 19 group => 'root', |
20 mode => 0644 | 20 mode => 0644 |
21 } | 21 } |
22 | 22 |
23 include nginx, 'spawn-fcgi' | 23 include nginx, 'spawn-fcgi' |
24 | 24 |
25 package {['nagios3', 'nagios3-doc', 'nagios-nrpe-plugin', 'php5-cgi', | 25 package {['nagios3', 'nagios3-doc', 'nagios-nrpe-plugin', 'php5-cgi', |
26 'fcgiwrap', 'pnp4nagios']: | 26 'fcgiwrap', 'pnp4nagios']: |
27 ensure => present | 27 ensure => present |
28 } | 28 } |
29 | 29 |
| 30 if $::operatingsystem == 'Debian' { |
| 31 class { 'apt::backports': |
| 32 release => 'jessie', |
| 33 location => 'http://ftp.debian.org/debian', |
| 34 } |
| 35 } |
| 36 |
30 nginx::hostconfig{$domain: | 37 nginx::hostconfig{$domain: |
31 source => 'puppet:///modules/nagios/site.conf', | 38 source => 'puppet:///modules/nagios/site.conf', |
32 is_default => $is_default, | 39 is_default => $is_default, |
33 certificate => $certificate, | 40 certificate => $certificate, |
34 private_key => $private_key, | 41 private_key => $private_key, |
35 log => 'access_log_monitoring' | 42 log => 'access_log_monitoring' |
36 } | 43 } |
37 | 44 |
38 spawn-fcgi::php-pool {'global': | 45 spawn-fcgi::php-pool {'global': |
39 ensure => present, | 46 ensure => present, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 notify => Service['nagios3'] | 160 notify => Service['nagios3'] |
154 } | 161 } |
155 | 162 |
156 create_resources(nagios_contact, $contacts) | 163 create_resources(nagios_contact, $contacts) |
157 create_resources(nagios_contactgroup, $contactgroups) | 164 create_resources(nagios_contactgroup, $contactgroups) |
158 create_resources(nagios_command, $commands) | 165 create_resources(nagios_command, $commands) |
159 create_resources(nagios_service, $services) | 166 create_resources(nagios_service, $services) |
160 create_resources(nagios_host, $hosts) | 167 create_resources(nagios_host, $hosts) |
161 create_resources(nagios_hostgroup, $hostgroups) | 168 create_resources(nagios_hostgroup, $hostgroups) |
162 } | 169 } |
OLD | NEW |