| Hi team, We got a problem regarding tidy resource. If we put a require => in tidy resource, for example require => Package['vvvvv'], if the package is failed to be absent, tidy will still remove files and then raise the Warning "Skipping because of failed depencies" For example, I write a simple Puppet code and tried to apply it: package { 'vvvvv': ensure => installed, } tidy { 'cleanup /tmp/tidytest': require => Package['vvvvv'], path => '/tmp/tidytest', age => '0', recurse => 1, rmdirs => false, matches => ['*'], } file { '/tmp/testfile.doc': ensure => present, require => Package['vvvvv'], } Due to package will not be installed. Then the result is /tmp/testfile.doc will not be created but all files under /tmp/tidytest will be removed. Both resources will raise the "Skipping because of failed depencies" but apparantly, tidy is triggered. Debug: Executing: '/bin/yum -d 0 -e 0 -y install vvvvv' Error: Execution of '/bin/yum -d 0 -e 0 -y install vvvvv' returned 1: Error: Nothing to do Error: /Stage[main]/Main/Package[vvvvv]/ensure: change from 'purged' to 'present' failed: Execution of '/bin/yum -d 0 -e 0 -y install vvvvv' returned 1: Error: Nothing to do Debug: /Stage[main]/Main/File[/tmp/tidytest/2]: Removing existing file for replacement with absent Notice: /Stage[main]/Main/File[/tmp/tidytest/2]/ensure: removed Debug: /Stage[main]/Main/File[/tmp/tidytest/2]: The container Class[Main] will propagate my refresh event Debug: /Stage[main]/Main/File[/tmp/tidytest/1]: Removing existing file for replacement with absent Notice: /Stage[main]/Main/File[/tmp/tidytest/1]/ensure: removed Debug: /Stage[main]/Main/File[/tmp/tidytest/1]: The container Class[Main] will propagate my refresh event Notice: /Stage[main]/Main/Tidy[cleanup /tmp/tidytest]: Dependency Package[vvvvv] has failures: true Warning: /Stage[main]/Main/Tidy[cleanup /tmp/tidytest]: Skipping because of failed dependencies Debug: /Stage[main]/Main/Tidy[cleanup /tmp/tidytest]: Resource is being skipped, unscheduling all events Warning: /Stage[main]/Main/File[/tmp/testfile.doc]: Skipping because of failed dependencies Debug: /Stage[main]/Main/File[/tmp/testfile.doc]: Resource is being skipped, unscheduling all events Debug: Class[Main]: Resource is being skipped, unscheduling all events Info: Class[Main]: Unscheduling all events on Class[Main] Please help to verify. thanks! |