Hi,

Puppet it's deleting not managed lines in some cases. Best explained in 
this example:

This is an example manifest:
{
cron { 'logrotate':
  command => '/usr/sbin/test1',
  user    => 'zabbix',
  hour    => ['2-4'],
  minute  => '*/10',
}

cron { 'prueba2':
  command => '/usr/sbin/test2',
  user    => 'zabbix',
  hour    => ['2-4'],
  minute  => '*/10',
}
}

If I apply it the result is the one:
{
# Puppet Name: logrotate
*/10 2-4 * * * /usr/sbin/test1
# Puppet Name: prueba2
*/10 2-4 * * * /usr/sbin/test2
}

If you edit the cron manually and you add two entries, and comment some 
entry managed by puppet, like this:

{
*/10 2-4 * * * /usr/sbin/example1
# Puppet Name: logrotate
#*/10 2-4 * * * /usr/sbin/test1
# Puppet Name: prueba2
#*/10 2-4 * * * /usr/sbin/test2
*/10 2-4 * * * /usr/sbin/example2
}

And you execute the manifest:
{
/opt/puppetlabs/puppet/bin/puppet apply cron.pp 
Notice: Compiled catalog for euclides.es.clara.net in environment 
production in 0.12 seconds
Notice: /Stage[main]/Main/Cron[logrotate]/ensure: created
Notice: /Stage[main]/Main/Cron[prueba2]/command: command changed 
'/usr/sbin/example2' to '/usr/sbin/test2'
Notice: Applied catalog in 0.26 seconds
}

You this this result: (example2 has been removed), this only happens when 
the not managed entry is present after the managed entries:
{
*/10 2-4 * * * /usr/sbin/example1
#*/10 2-4 * * * /usr/sbin/test1
#*/10 2-4 * * * /usr/sbin/test2
# Puppet Name: prueba2
*/10 2-4 * * * /usr/sbin/test2
# Puppet Name: logrotate
*/10 2-4 * * * /usr/sbin/test1
}

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2e742dc3-d99a-4ee9-945c-a124f19905dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to