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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to