diff options
author | varac <varacanero@zeromail.org> | 2014-03-04 15:49:58 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-03-04 18:59:03 +0100 |
commit | e603adab7cd31177e133487ba817300ce68a1e5c (patch) | |
tree | 4cef8d131686e28c3cbb3dbb60856b0fb447a1c7 | |
parent | 32217e18179687cd4adde350379c57c7f96ca59f (diff) |
fix duplicate declarations in /etc/nagios3/conf.d/ on first deploy (Bug #5129)
-rw-r--r-- | puppet/modules/site_nagios/manifests/server.pp | 4 | ||||
-rw-r--r-- | puppet/modules/site_nagios/manifests/server/purge.pp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/puppet/modules/site_nagios/manifests/server.pp b/puppet/modules/site_nagios/manifests/server.pp index 9aae8ae8..7106c36a 100644 --- a/puppet/modules/site_nagios/manifests/server.pp +++ b/puppet/modules/site_nagios/manifests/server.pp @@ -1,9 +1,7 @@ class site_nagios::server inherits nagios::base { # First, purge old nagios config (see #1467) - class { 'site_nagios::server::purge': - stage => setup - } + class { 'site_nagios::server::purge': } $nagios_hiera = hiera('nagios') $nagiosadmin_pw = htpasswd_sha1($nagios_hiera['nagiosadmin_pw']) diff --git a/puppet/modules/site_nagios/manifests/server/purge.pp b/puppet/modules/site_nagios/manifests/server/purge.pp index 1c12cfb0..6815a703 100644 --- a/puppet/modules/site_nagios/manifests/server/purge.pp +++ b/puppet/modules/site_nagios/manifests/server/purge.pp @@ -10,9 +10,10 @@ class site_nagios::server::purge inherits nagios::base { purge => false } - # only purge find in the /etc/nagios3/conf.d/ dir, not in any subdir + # only purge files in the /etc/nagios3/conf.d/ dir, not in any subdir exec {'purge_conf.d': command => '/usr/bin/find /etc/nagios3/conf.d/ -maxdepth 1 -type f -exec rm {} \;', - onlyif => '/usr/bin/find /etc/nagios3/conf.d/ -maxdepth 1 -type f | grep -q "/etc/nagios3/conf.d"' + onlyif => '/usr/bin/find /etc/nagios3/conf.d/ -maxdepth 1 -type f | grep -q "/etc/nagios3/conf.d"', + require => Package['nagios'] } } |