Why isn't the "tidy" resource removing files on a new provision. I have the following:
package {'apache2':
ensure => present,
before => [
File["/etc/apache2/apache2.conf"],
File["/etc/apache2/envvars"]
],
}->
#Remove the conf files in the conf.d directory except the charset.
tidy { 'tidy_apache_conf':
path => '/etc/apache2/conf.d/',
recurse => 1,
backup => true,
matches => [
'localized-error-pages',
'other-vhosts-access-log',
'security'
],
}
On provisioning the files specified in the matches attribute aren't removed. However by specifying a "file" resource, I see the desired results.
$unwanted_apache_conf = [
'/etc/apache2/conf.d/localized-error-pages',
'/etc/apache2/conf.d/other-vhosts-access-log',
'/etc/apache2/conf.d/security'
]
package {'apache2':
ensure => present,
before => [
File["/etc/apache2/apache2.conf"],
File["/etc/apache2/envvars"]
],
}->
file { $unwanted_apache_conf:
ensure => absent
}
Why isn't the tidy resource removing the files? The tidy resource should be generating a file resource for each file matched. Am I missing an attribute in the tidy resource, or just missing the concept entirely? Is there any way to see what the file resources the tidy resource is generating look like? Thanks for any input.
--verbose,--debugand--evaltraceswitches. - Felix Frank