diff --git a/site-modules/profile/manifests/puppet/master.pp b/site-modules/profile/manifests/puppet/master.pp --- a/site-modules/profile/manifests/puppet/master.pp +++ b/site-modules/profile/manifests/puppet/master.pp @@ -34,12 +34,16 @@ content => template('profile/puppet/swh-puppet-master-deploy.sh.erb'), } - file { '/usr/local/sbin/swh-puppet-master-clean-certificate': + file {'/usr/local/sbin/swh-puppet-master-clean-certificate': + ensure => absent, + } + + file { '/usr/local/sbin/swh-puppet-master-decomission': ensure => 'file', owner => 'root', group => 'root', mode => '0755', - content => template('profile/puppet/swh-puppet-master-clean-certificate.sh.erb'), + content => template('profile/puppet/swh-puppet-master-decomission.sh.erb'), } profile::cron::d {'gzip-puppet-reports': diff --git a/site-modules/profile/templates/puppet/swh-puppet-master-clean-certificate.sh.erb b/site-modules/profile/templates/puppet/swh-puppet-master-decomission.sh.erb rename from site-modules/profile/templates/puppet/swh-puppet-master-clean-certificate.sh.erb rename to site-modules/profile/templates/puppet/swh-puppet-master-decomission.sh.erb --- a/site-modules/profile/templates/puppet/swh-puppet-master-clean-certificate.sh.erb +++ b/site-modules/profile/templates/puppet/swh-puppet-master-decomission.sh.erb @@ -8,6 +8,7 @@ set -x +puppet node deactivate $@ puppet node clean $@ puppet cert clean $@ systemctl restart apache2