Here is the puppet snippet I use:
class standalone-puppet {
$logdest = "/var/log/puppet/cron.log"
cron { hourly-puppet:
command => "/usr/bin/puppet \
--use-nodes /etc/puppet/manifests/site.pp \
--logdest $logdest",
user => root,
minute => 48,
}
}
Every time puppet runs and updates the cronjob, on debian, it updates the cron entry:
notice: //default/standalone-puppet/Cron[hourly-puppet]/command: command changed '/usr/bin/puppet --use-nodes /etc/puppet/manifests/site.pp --logdest /var/log/puppet/cron.log' to '/usr/bin/puppet --use-nodes /etc/puppet/manifests/site.pp --logdest /var/log/puppet/cron.log'
I'm not sure the problem is on puppet or crontab's side, but it would be nice to prevent this.
Also, maybe there is a better technique for writing long strings - here documents?