Robert Citek
2011-Aug-16 16:24 UTC
[Puppet Users] creating a puppet resource from existing cron
Is there a "puppetized" way for puppet to create a resource file from
an existing crontab?
Here''s an example of what has worked for me:
$ crontab -l
* * * * * date > /tmp/date.log
$ ralsh cron
Could not run: You must specify a name or title for resources
$ crontab -l | awk ''!/^ *#/ {print "# Puppet Name: item-" NR
; print }
'' | crontab
$ crontab -l
# Puppet Name: item-1
* * * * * date > /tmp/date.txt
$ ralsh cron
cron { ''item-1'':
user => ''foobar'',
command => ''date > /tmp/date.txt'',
ensure => ''present'',
target => ''foobar''
}
$ puppet -V
0.25.4
$ cat /etc/issue.net
Ubuntu 10.04.3 LTS
Regards,
- Robert
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Apparently Analagous Threads
- Recent (unfun) experience with cron resource on Solaris 10 with puppet 0.25.5
- ANNOUNCE: Puppet 2.6.5 - Release Candidate 1 available!
- Fwd: [Puppet-dev] ANNOUNCE: Puppet 2.6.5 - Release Candidate 1 available!
- vixie cron 3.0.1 continued
- puppet vs cron vs x86_64
