Shark Laser
2014-Jan-02 23:39 UTC
[Puppet Users] Detect when files are put in a directory? And alternatives?
I'm a puppet newbie but have gone through the tutorial and now read most of a book on the subject. (So please tell me if I am approaching the problem wrong conceptually). Problem: We want a directory where any user can put a file which will signify a program that is to be installed by Puppet. i.e. If one were to go to this special location and do 'touch someSpecialCompileOfApache' then Puppet would see the new file in the directory and we would have additional logic to then install a special compile of apache. (just a simple contrived example) The first hurdle seems to be that 'notify' s don't get triggered on a directory if files are merely put in the directory. Are my findings here correct? It seems the directory itself would have to change to trigger the notify? ie the name of the directory or a permission? That seems to nix the first attempt. Assuming I am right so far, I thought of a second possibly simpler approach. I wanted to have one text file. Each line in the text file would contain an entry for a program that was to be installed. I'm sure I can get notify's when the single file is changed. Is puppet sophisticated enough that I could see what the change was in the text file and then determine an action based on that? Thanks in advance. -- 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 puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7f71bfe0-2310-474b-a55e-f3bf9bfc3bf8%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.