Issue #709 has been updated by Felix Frank.
All right, turns out I cannot easily make puppet 0.25 and lower run from my git
clone.
However, the issue definitely doesn't reproduce from 2.6.17 up.
What doesn't work
- slurp up matching environments for formerly unmanaged cronjobs (i.e., jobs
without puppet name)
- trying to force puppet to accept an match an environment line containing
newlines
I think the latter issue is stupid, even though it could be fixes. I vote not.
If the former warrants the attempt at fixing, let me know. I'd try.
For reference, my test:
<pre>
ffrank@geras:~/git/puppet$ crontab -l
# HEADER: This file was autogenerated at Tue Mar 19 22:58:15 +0100 2013 by
puppet.
# HEADER: While it can still be managed manually, it is definitely not
recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: usual
FOO=bar
BAR=baz
0 1 * * * /bin/date
ffrank@geras:~/git/puppet$ RUBYLIB=lib bin/puppet apply -e 'cron { "usual":
user => "ffrank", hour => 1, minute => 0, ensure => present, command =>
"/bin/date", environment => [ "FOO=bar", "BAR=baz" ] }'
Notice: Finished catalog run in 0.17 seconds
</pre>
----------------------------------------
Bug #709: crontab type seems to detect the current environment lines wrong
https://projects.puppetlabs.com/issues/709#change-87249
* Author: Karl Pietri
* Status: Accepted
* Priority: Normal
* Assignee:
* Category: cron
* Target version:
* Affected Puppet version: 0.24.7
* Keywords: cronfixit
* Branch:
----------------------------------------
<pre>
notice:
//node1/baseserverrole/webserverrole/webcron/rcron[ntpd_check]/Cron[ntpd_check]/environment:
environment changed
'[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]'
to '[email protected]'
</pre>
The cron provider seems to think there are more MAILTO's then actually are. As
listing the crontab shows:
<pre>
# Puppet Name: ntpd_check
[email protected]
*/5 * * * * /root/bin/ntpmon > /dev/null 2>&1
</pre>
This happens everytime puppetd --test is run.
puppet config:
<pre>
rCron{ ntpd_check:
command=>"/root/bin/ntpmon > /dev/null 2>&1",
minute=>"*/5",
require=>RFile[[rootbinntpmon]]
}
define
rCron($command,$minute=absent,$hour=absent,$monthday=absent,$month=absent,$weekday=absent,$environment="[email protected]"){
cron{ $name:
command=>$command,
minute=>$minute,
hour=>$hour,
month=>$month,
monthday=>$monthday,
weekday=>$weekday,
environment=>$environment,
user=>root
}
}
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.