Summary
info and notice messages are generated when using File { purge => true, recurse => true }
Description
As documented in the FAQ
When using something like:
file { "/etc/nagios/conf.d":
owner => nagios,
group => nagios,
purge => true,
recurse => true,
}
"It seems what most people expect to happen here is create the named directory, set the owner and group, then purge any files or directories that are not managed by puppet underneath that. But this is not the behavior puppet will display. In fact the purge will silently fail.
The workaround is to define a source for the directory that doesn't exist."
So we must use a non existent source:
file { "/etc/nagios/conf.d":
owner => nagios,
group => nagios,
purge => true,
recurse => true,
source => "/dev/null/nuller",
This is a reasonably acceptable hack, but the problem is the number of log messages:
notice: mount[localhost]: File source /var/should/not/exist/at/all/or/ever does not exist
info: //default/puppet/puppet::server/firewall/File[/etc/sysconfig/iptables.d]/source: No specified sources exist
I haven't really thought through how this might be solved, but my initial idea of providing a loglevel metaparam and setting it to silence the messages should not be the final solution, because it will mask other "real" problems with the resource.
Possibly related tickets: #543 #789