summaryrefslogtreecommitdiff
path: root/puppet/modules/site_nagios
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_nagios')
-rw-r--r--puppet/modules/site_nagios/manifests/server.pp5
-rw-r--r--puppet/modules/site_nagios/manifests/server/purge.pp7
2 files changed, 12 insertions, 0 deletions
diff --git a/puppet/modules/site_nagios/manifests/server.pp b/puppet/modules/site_nagios/manifests/server.pp
index 7c17fe82..5e2f832b 100644
--- a/puppet/modules/site_nagios/manifests/server.pp
+++ b/puppet/modules/site_nagios/manifests/server.pp
@@ -1,5 +1,10 @@
class site_nagios::server inherits nagios::base {
+ # First, purge old nagios config (see #1467)
+ class { 'site_nagios::server::purge':
+ stage => initial
+ }
+
$nagios_hiera=hiera('nagios')
$nagiosadmin_pw = htpasswd_sha1($nagios_hiera['nagiosadmin_pw'])
$hosts = $nagios_hiera['hosts']
diff --git a/puppet/modules/site_nagios/manifests/server/purge.pp b/puppet/modules/site_nagios/manifests/server/purge.pp
new file mode 100644
index 00000000..66c27dd5
--- /dev/null
+++ b/puppet/modules/site_nagios/manifests/server/purge.pp
@@ -0,0 +1,7 @@
+class site_nagios::server::purge {
+ exec {'purge_conf.d':
+ command => '/bin/rm -rf /etc/nagios3/conf.d',
+ onlyif => 'test -e /etc/nagios3/conf.d'
+ }
+
+}