summaryrefslogtreecommitdiff
path: root/puppet/modules/site_nagios
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-03-10 20:24:40 +0100
committervarac <varacanero@zeromail.org>2016-03-10 20:24:40 +0100
commit3d0645e5051aae10e546d8f8fb11335bb876ae1e (patch)
tree29a7a1adf40ec3cb489fcc4aecf705358cd19c30 /puppet/modules/site_nagios
parent3c4b42c0658a432a3efef8e1b3f07b49ada1ddac (diff)
parent91251fd30a7b1e5baa17aeff932d8bd13c370d8a (diff)
Merge branch 'add_site_nagios_dependencies' into develop
Diffstat (limited to 'puppet/modules/site_nagios')
-rw-r--r--puppet/modules/site_nagios/manifests/server.pp8
-rw-r--r--puppet/modules/site_nagios/manifests/server/add_contacts.pp4
-rw-r--r--puppet/modules/site_nagios/manifests/server/contactgroup.pp4
-rw-r--r--puppet/modules/site_nagios/manifests/server/hostgroup.pp3
4 files changed, 13 insertions, 6 deletions
diff --git a/puppet/modules/site_nagios/manifests/server.pp b/puppet/modules/site_nagios/manifests/server.pp
index 5939c82b..aa9b956e 100644
--- a/puppet/modules/site_nagios/manifests/server.pp
+++ b/puppet/modules/site_nagios/manifests/server.pp
@@ -46,11 +46,13 @@ class site_nagios::server inherits nagios::base {
# is not fixed, we need to manually deploy the config file
file {
'/etc/apache2/conf-available/nagios3.conf':
- ensure => present,
- source => 'puppet:///modules/nagios/configs/apache2.conf';
+ ensure => present,
+ source => 'puppet:///modules/nagios/configs/apache2.conf',
+ require => [ Package['nagios3'], Package['apache2'] ];
'/etc/apache2/conf-enabled/nagios3.conf':
ensure => link,
- target => '/etc/apache2/conf-available/nagios3.conf';
+ target => '/etc/apache2/conf-available/nagios3.conf',
+ require => [ Package['nagios3'], Package['apache2'] ];
}
include site_apache::common
diff --git a/puppet/modules/site_nagios/manifests/server/add_contacts.pp b/puppet/modules/site_nagios/manifests/server/add_contacts.pp
index db507abf..b5c6f0a5 100644
--- a/puppet/modules/site_nagios/manifests/server/add_contacts.pp
+++ b/puppet/modules/site_nagios/manifests/server/add_contacts.pp
@@ -1,3 +1,4 @@
+# configure a nagios_contact
define site_nagios::server::add_contacts ($contact_emails) {
$environment = $name
@@ -11,6 +12,7 @@ define site_nagios::server::add_contacts ($contact_emails) {
host_notification_options => 'd,r',
service_notification_commands => 'notify-service-by-email',
host_notification_commands => 'notify-host-by-email',
- email => join($contact_emails, ', ')
+ email => join($contact_emails, ', '),
+ require => Package['nagios']
}
}
diff --git a/puppet/modules/site_nagios/manifests/server/contactgroup.pp b/puppet/modules/site_nagios/manifests/server/contactgroup.pp
index 188c54f1..5e60dd06 100644
--- a/puppet/modules/site_nagios/manifests/server/contactgroup.pp
+++ b/puppet/modules/site_nagios/manifests/server/contactgroup.pp
@@ -1,6 +1,8 @@
+# configure a contactgroup
define site_nagios::server::contactgroup ($contact_emails) {
nagios_contactgroup { $name:
- members => $name
+ members => $name,
+ require => Package['nagios']
}
}
diff --git a/puppet/modules/site_nagios/manifests/server/hostgroup.pp b/puppet/modules/site_nagios/manifests/server/hostgroup.pp
index 25623924..0692fced 100644
--- a/puppet/modules/site_nagios/manifests/server/hostgroup.pp
+++ b/puppet/modules/site_nagios/manifests/server/hostgroup.pp
@@ -1,6 +1,7 @@
# create a nagios hostsgroup
define site_nagios::server::hostgroup ($contact_emails) {
nagios_hostgroup { $name:
- ensure => present
+ ensure => present,
+ require => Package['nagios']
}
}