Have gobby reload its config when we change its ssl cert
[mirror/dsa-puppet.git] / modules / nagios / manifests / server.pp
1 class nagios::server {
2
3         package { [
4                         'nagios3',
5                         'nagios-nrpe-plugin',
6                         'nagios-plugins',
7                         'nagios-images'
8                 ]:
9                 ensure => installed
10         }
11
12         file { '/etc/init.d/nagios3':
13                 source  => 'puppet:///modules/nagios/nagios3.init',
14                 mode    => '0755',
15                 require => Package['nagios3'],
16                 before  => Service['nagios3'],
17         }
18
19         service { 'nagios3':
20                 ensure  => running,
21                 require => Package['nagios3'],
22         }
23
24         file { '/etc/nagios-plugins/config':
25                 ensure  => directory,
26                 recurse => remote,
27                 source  => 'puppet:///files/empty/',
28                 require => Package['nagios3'],
29                 notify  => Service['nagios3'],
30         }
31         file { '/etc/nagios3':
32                 ensure  => directory,
33                 recurse => remote,
34                 source  => 'puppet:///files/empty/',
35                 require => Package['nagios3'],
36                 notify  => Service['nagios3'],
37         }
38         file { '/etc/nagios3/puppetconf.d':
39                 ensure => directory,
40                 recurse => remote,
41                 source  => 'puppet:///files/empty/',
42                 require => Package['nagios3'],
43                 notify  => Service['nagios3'],
44         }
45         file { '/etc/nagios-plugins/config/local-dsa-checkcommands.cfg':
46                 source => 'puppet:///modules/nagios/dsa-nagios/static/checkcommands.cfg',
47                 notify => Service['nagios3'],
48         }
49         file { '/etc/nagios-plugins/config/local-dsa-eventhandlers.cfg':
50                 source => 'puppet:///modules/nagios/dsa-nagios/static/eventhandlers.cfg',
51                 notify => Service['nagios3'],
52         }
53         file { '/etc/nagios3/cgi.cfg':
54                 source => 'puppet:///modules/nagios/dsa-nagios/static/cgi.cfg',
55                 notify => Service['nagios3'],
56         }
57         file { '/etc/nagios3/nagios.cfg':
58                 source => 'puppet:///modules/nagios/dsa-nagios/static/nagios.cfg',
59                 notify => Service['nagios3'],
60         }
61         file { '/etc/nagios3/puppetconf.d/contacts.cfg':
62                 source => 'puppet:///modules/nagios/dsa-nagios/static/conf.d/contacts.cfg',
63                 notify => Service['nagios3'],
64         }
65         file { '/etc/nagios3/puppetconf.d/generic-host.cfg':
66                 source => 'puppet:///modules/nagios/dsa-nagios/static/conf.d/generic-host.cfg',
67                 notify => Service['nagios3'],
68         }
69         file { '/etc/nagios3/puppetconf.d/generic-service.cfg':
70                 source => 'puppet:///modules/nagios/dsa-nagios/static/conf.d/generic-service.cfg',
71                 notify => Service['nagios3'],
72         }
73         file { '/etc/nagios3/puppetconf.d/timeperiods.cfg':
74                 source => 'puppet:///modules/nagios/dsa-nagios/static/conf.d/timeperiods.cfg',
75                 notify => Service['nagios3'],
76         }
77         file { '/etc/nagios3/puppetconf.d/auto-dependencies.cfg':
78                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-dependencies.cfg',
79                 notify => Service['nagios3'],
80         }
81         file { '/etc/nagios3/puppetconf.d/auto-hostextinfo.cfg':
82                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-hostextinfo.cfg',
83                 notify => Service['nagios3'],
84         }
85         file { '/etc/nagios3/puppetconf.d/auto-hostgroups.cfg':
86                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-hostgroups.cfg',
87                 notify => Service['nagios3'],
88         }
89         file { '/etc/nagios3/puppetconf.d/auto-hosts.cfg':
90                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-hosts.cfg',
91                 notify => Service['nagios3'],
92         }
93         file { '/etc/nagios3/puppetconf.d/auto-serviceextinfo.cfg':
94                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-serviceextinfo.cfg',
95                 notify => Service['nagios3'],
96         }
97         file { '/etc/nagios3/puppetconf.d/auto-servicegroups.cfg':
98                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-servicegroups.cfg',
99                 notify => Service['nagios3'],
100         }
101         file { '/etc/nagios3/puppetconf.d/auto-services.cfg':
102                 source => 'puppet:///modules/nagios/dsa-nagios/generated/auto-services.cfg',
103                 notify => Service['nagios3'],
104         }
105 }