Issue #1453 has been updated by Matthaus Owens.

Released in Puppet 3.2.0-rc1

----------------------------------------
Bug #1453: removing a cron parameter does not change the object
https://projects.puppetlabs.com/issues/1453#change-89516

* Author: Martha Greenberg
* Status: Closed
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: cron
* Target version: 3.2.0
* Affected Puppet version: 0.24.5
* Keywords: cron
* Branch: https://github.com/puppetlabs/puppet/pull/1570
----------------------------------------
If you remove a parameter from a cron object, it should change the cron job to 
have * in that field.  However, puppet does not change it unless you specify 
"*".
<pre>
# cat /tmp/1.pp
cron { "test":
  command => "/bin/echo test",
  hour    => "4",
  minute  => "3",
}

# puppet -v /tmp/1.pp
notice: //Cron[test]/ensure: created

# cat /var/spool/cron/crontabs/root
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Sun Jul 27 23:45:24 2008)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# HEADER: This file was autogenerated at Sun Jul 27 23:45:24 +0300 2008 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: test
3 4 * * * /bin/echo test

# cat /tmp/2.pp
cron { "test":
  command => "/bin/echo test",
  minute  => "5",
}

# puppet -v /tmp/2.pp
notice: //Cron[test]/minute: minute changed '3' to '5'

# cat /var/spool/cron/crontabs/root
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Sun Jul 27 23:51:11 2008)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# HEADER: This file was autogenerated at Sun Jul 27 23:51:11 +0300 2008 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: test
5 4 * * * /bin/echo test
</pre>

Notice that hour is still set to 4, not *!


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