diff options
Diffstat (limited to 'manifests/cron/linux.pp')
-rw-r--r-- | manifests/cron/linux.pp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/manifests/cron/linux.pp b/manifests/cron/linux.pp index d0d0e92..3742d48 100644 --- a/manifests/cron/linux.pp +++ b/manifests/cron/linux.pp @@ -1,25 +1,11 @@ +# manifests/cron/linux.pp class puppet::cron::linux inherits puppet::linux { include puppet::cron::base - if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' } - if $::puppet_http_compression { - $puppet_http_compression_str = '--http_compression' - } - - - if !$puppet_crontime { - $puppet_crontime_interval_minute = fqdn_rand(29) - $puppet_crontime_interval_minute2 = inline_template('<%= 30+puppet_crontime_interval_minute.to_i %>') - $puppet_crontime = "${puppet_crontime_interval_minute},${puppet_crontime_interval_minute2} * * * *" - } - - include ::cron File['/etc/cron.d/puppetd']{ - source => undef, - content => "#run puppet\n${puppet_crontime} root output=\$(/usr/bin/puppet agent --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, - notify => Service['cron'] + source => undef, + content => "#run puppet\n${puppet::cron::base::crontime} root output=\$(/usr/bin/puppet agent --onetime --no-daemonize --splay --config=/etc/puppet/puppet.conf --color false ${puppet::cron::base::http_compression_str}); ret=\$?; printf \"\\%s\" \"\$output\" | grep -E '(^err:|^alert:|^emerg:|^crit:)'; exit \$ret\n", + before => Service['puppet'], } } |