Issue #2845 has been updated by Jesse Wolfe.

Status changed from Accepted to Ready for Testing
Branch set to http://github.com/jes5199/puppet/tree/ticket/0.25.x/2845


----------------------------------------
Bug #2845: Cron entries using "special" parameter lose their title when changed
http://projects.reductivelabs.com/issues/2845

Author: Tom Mortimer-Jones
Status: Ready for Testing
Priority: Normal
Assigned to: Jesse Wolfe
Category: 
Target version: 0.25.3
Affected version: 0.25.2
Keywords: 
Branch: http://github.com/jes5199/puppet/tree/ticket/0.25.x/2845


When using a special parameter (e.g @reboot ...) to create a cron entry the 
entry is added to with a title comment "# Puppet Name: ..." just like a regular 
entry. However when the entry is modified the comment is dropped. Because there 
is no longer a comment title if the entry is modified again, instead of 
replacing the old line, it will add a new line complete with comment. The old 
line is now left orphaned.

Example:

<pre>
cron{ "test":
    command => "/bin/echo One > /tmp/puppet.txt",
    special => "reboot",
}
</pre>

gives:

<pre>
# Puppet Name: test
@reboot /bin/echo One > /tmp/puppet.txt
</pre>

changing to:

<pre>
cron{ "test":
    command => "/bin/echo Two > /tmp/puppet.txt",
    special => "reboot",
}
</pre>

gives:

<pre>
@reboot /bin/echo Two > /tmp/puppet.txt
</pre>

changing again to:

<pre>
cron{ "test":
    command => "/bin/echo Three > /tmp/puppet.txt",
    special => "reboot",
}
</pre>

gives:

<pre>
@reboot /bin/echo Two > /tmp/puppet.txt
# Puppet Name: test
@reboot /bin/echo Three > /tmp/puppet.txt
</pre>


-- 
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://reductivelabs.com/redmine/my/account
--
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
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-bugs?hl=en.

Reply via email to