| Puppet Version: All tested (latest) Puppet Server Version: 4, 5, 6.1.0 OS Name/Version: Centos 6/7 When a system does not have a cron handler installed, but the manifest installs cron and then installs a cron entry for a user, the cron entry will NOT get added to the user but instead to root. If you run again it will install for the user. This is obviously not intended and can potentially create a security risk (as cronjobs will run as root unintended). More importantly, it breaks stuff. Here is a sample that you can replace your site.pp with and run against an agent to reproduce:
- Make sure cronie is NOT installed (or any cron provider) for the sample race condition.
package { 'cronie': ensure => installed, }
cron { 'race_condition_test': ensure => present, user => 'nobody', # This can be any user as long as they exist. minute => '*/30', command => '/bin/false', require => Package['cronie'], } |