From 06942f75f03b5c8a78c8b3a9f466bf72b1b34f5c Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 11 Apr 2012 18:46:53 -0400 Subject: implement fix for cron file being put in place even when you do not include puppet::cron. The module should make sure that the cron file is not there if you aren't using the cron method, otherwise the daemon and the cronjob could both run. Used suggested change from jcharaoui in #3513 --- manifests/cron/linux.pp | 1 + manifests/linux.pp | 1 + 2 files changed, 2 insertions(+) (limited to 'manifests') diff --git a/manifests/cron/linux.pp b/manifests/cron/linux.pp index bab9564..5003559 100644 --- a/manifests/cron/linux.pp +++ b/manifests/cron/linux.pp @@ -16,5 +16,6 @@ class puppet::cron::linux inherits puppet::linux { 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'], + ensure => present } } diff --git a/manifests/linux.pp b/manifests/linux.pp index fcd3936..13788ef 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -19,5 +19,6 @@ class puppet::linux inherits puppet::base { "puppet:///modules/puppet/cron.d/puppetd.${operatingsystem}", "puppet:///modules/puppet/cron.d/puppetd" ], owner => root, group => 0, mode => 0644, + ensure => absent } } -- cgit v1.2.3