Issue #19716 has been updated by Charlie Sharpsteen.

Status changed from Unreviewed to Investigating
Assignee set to Charlie Sharpsteen
Affected Puppet version changed from 3.0.1 to development

Very true that the documentation doesn't match the behavior in this case. 
Uncommented cronjob entries cannot be converted to Puppet resources [#3220/note 
15](https://projects.puppetlabs.com/issues/3220#note-15) so the provider can't 
take them under management. The current state of affairs can be best described 
as "Puppet will not create a cron resource if would exactly duplicate an 
existing crontab entry".

L Harris wrote:
> Also if there is a comment line like
>    
>     # Puppet Name: foobarbaz  
>
> before the job, puppet won't change it to the new name.

This is a bit different. The entry "foobarbaz" is an unmanaged Puppet resource 
and Puppet won't alter it unless you specifically call it up by name and do 
something:

<pre>
cron{ 'foobarbaz':
  ensure => absent,
}
</pre>

Currently, this is the expected behavior for unmanaged resources. See #7600 for 
more discussion.
----------------------------------------
Bug #19716: cron job not sucked into puppet
https://projects.puppetlabs.com/issues/19716#change-87009

Author: L Harris
Status: Investigating
Priority: Normal
Assignee: Charlie Sharpsteen
Category: cron
Target version: 
Affected Puppet version: development
Keywords: 
Branch: 


According to http://docs.puppetlabs.com/references/3.0.1/type.html#cron
"If you specify a cron job that matches an existing job in every way except 
name, then the jobs will be considered equivalent and the new name will be 
permanently associated with that job. Once this association is made and synced 
to disk, you can then manage the job normally (e.g., change the schedule of the 
job)."

existing job in root's crontab:
1 22 * * * /opt/novell/ExpirationNotification/expires.sh

puppet manifest
cron { "expires":
  command => "/opt/novell/ExpirationNotification/expires.sh",
  user    => "root",
  hour    => 22,
  minute  => 1,
  require  => File["/opt/novell/ExpirationNotification/expires.sh"],
}

running puppet results in puppet knowing not to change the job (or to add a 2nd 
one), but doesn't assign it a name.  So when you do change something about the 
job (in my case the run time) it creates a 2nd job.


-- 
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.


Reply via email to