Hi,
On Thursday, 8 March 2012 17:05:47 UTC, Jeeva wrote:
>
> Hi Peter,
>
> with the help of Jerrery, i got the below module and i modified it as per
> our requirement. So the below module will create a crontab on root user
> right ?
>
> # Generate the times when the cronjob will run
> class cron_puppet {
> $cron_time1= generate('/usr/bin/env', 'sh', '-c', "printf $(($(echo
> $::ipaddress | awk -F . \'{print \$1+\$2+\$3+\$4}\') % 30))")
> $cron_time2 = $cron_time1 + 30
> cron { 'run-my-puppet-agent':
> ensure => present,
> command => /usr/local/sbin/puppetd --onetime --no-daemonize >
> /dev/null 2>&1,
> minute => [$cron_time1, $cron_time2],
> user => 'root',
> }
> }
>
>
If you already have MCollective and/or planning to incorporate it into your
infrastructure in the future, then have a look at this:
http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/ToolPuppetcommander
Beats every cron job.
KW
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/Ll76Tg3qXc8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.