puppet subscribe to a file that it doesn't manage
Can I have Puppet subscribe to a file that it doesn't manage, but it does manage the parent directory?
No, Puppet cannot send notifications based on resources it does not manage.
In the case of a file resource, it can appear to - in the case where you have a managed directory and "recurse => true". In this case, Puppet crates an implicit file resource.
It is also not possible to have subscription noticed fired of when something outside of Puppet changes a file (only when Puppet changes it back to the described state)
Like llowder said, Puppet is explicitly designed not to work this way. It only cares (and knows about) about resources you explicitly tell it to care about and manage.
I'm not sure what problem you're exactly trying to solve, but I was curious if Puppet could be abused to do this without any external tools. I don't recommend actually doing what I'm proposing, but it was a fun thought experiment.
Asked: 2013-05-29 13:57:15 -0500
Seen: 212 times
Last updated: May 30 '13