From 87b8cf7133beb4c9dd6f6e7692d374d302f8ea5a Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Wed, 2 Jan 2013 11:26:56 -0500 Subject: Make all linux distributions use the same path for the cron file This simplifies the hierarchy and fixes the problem that going from puppet::cron to puppet under debian doesn't remove the cron file. Signed-off-by: Gabriel Filion --- manifests/cron.pp | 3 +-- manifests/cron/debian.pp | 7 ------- manifests/cron/linux.pp | 2 +- manifests/linux.pp | 4 ++++ 4 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 manifests/cron/debian.pp (limited to 'manifests') diff --git a/manifests/cron.pp b/manifests/cron.pp index 9a632ff..644475e 100644 --- a/manifests/cron.pp +++ b/manifests/cron.pp @@ -2,8 +2,7 @@ class puppet::cron inherits puppet { case $operatingsystem { - linux: { include puppet::cron::linux } - debian: { include puppet::cron::debian } + linux,debian,ubuntu: { include puppet::cron::linux } openbsd: { include puppet::cron::openbsd } freebsd: { include puppet::cron::freebsd } default: { include puppet::cron::base } diff --git a/manifests/cron/debian.pp b/manifests/cron/debian.pp deleted file mode 100644 index 0b4bd61..0000000 --- a/manifests/cron/debian.pp +++ /dev/null @@ -1,7 +0,0 @@ -class puppet::cron::debian inherits puppet::cron::linux { - - File['/etc/cron.d/puppetd.cron']{ - path => '/etc/cron.d/puppetd', - } - -} diff --git a/manifests/cron/linux.pp b/manifests/cron/linux.pp index e00b4d0..f5b0ebb 100644 --- a/manifests/cron/linux.pp +++ b/manifests/cron/linux.pp @@ -15,7 +15,7 @@ class puppet::cron::linux inherits puppet::linux { include ::cron - File['/etc/cron.d/puppetd.cron']{ + File['/etc/cron.d/puppetd']{ source => undef, content => "#run puppet\n${puppet_crontime} root output=\$(/usr/sbin/puppetd --onetime --no-daemonize --splay --config=/etc/puppet/puppet.conf --color false); ret=\$?; printf \"\\%s\" \"\$output\" | grep -E '(^err:|^alert:|^emerg:|^crit:)'; exit \$ret\n", before => Service['puppet'], diff --git a/manifests/linux.pp b/manifests/linux.pp index b2359d2..e752788 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -14,6 +14,10 @@ class puppet::linux inherits puppet::base { require => Package[puppet], } + file { '/etc/cron.d/puppetd': + ensure => absent + } + # For backwards compatibility, remove this so that the cron is not duplicated file { '/etc/cron.d/puppetd.cron': ensure => absent } -- cgit v1.2.3