On Friday, April 19, 2013 3:21:26 PM UTC-5, Dennis Miller wrote:
>
> This doesn't seem to work for me in THIS specific case:
>
> -editing the file directly under /var/named
>
> Adding a new file works fine, but editing an existing one doesn't trigger 
> the exec.  I think the directory mtime doesn't change, and Puppet doesn't 
> know that a change has happened.  Thoughts?
>
>
I think Puppet's File type is not up to this task in recursive directory 
form, at least not without a bit of help.  That could perhaps be 
characterized as a bug (so consider filing a ticket), but then again, the 
whole recursive file thing has always been ... let's say "quirky".

Dennis's observation suggests a possible workaround: always 'touch' the 
top-level directory on the master after making changes to its contents.  If 
it has subdirectories then you might need to do the same with them.

Alternatively, are there so many files, or are files added and removed 
frequently enough, that it would be prohibitive to manage each explicitly?  
Recursive directory management should be viewed as a shortcut.  If it 
doesn't get you to where you need to be, however, then you may just need to 
abandon it.

Here's a crazy idea: I think it would be possible to write a pair of 
definitions that automate the procedure of declaring bona fide File 
resources for all the files in a directory tree.  You would use the 
generate() function to get a (full) listing of the target directory, and 
massage it into a hash of hashes that you can use with create_resources().  
I surely make it sound simpler than it really is, but I think it's doable.

John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to