To continue and close this one, I'm using iwatch right now which internally uses inotify, though I find iwatch to be a bit slow at times and can't keep up with lots of fs changes. Together with iwatch I'm using csync2 to keep a few servers in sync. This is working fine so far.
What I was actually wondering about was puppet syntax and not really so much about how to setup watch paths. I've found a way to do what I needed using erb and iwatch's xml config file. I guess though that David Schmitts suggestion was what I was looking for. Thanks! On Jul 27, 8:41 am, David Schmitt <da...@dasz.at> wrote: > grandpawrote: > > I'm VERY new to puppet (had quite a bit of fun for a few days!). > > Great, welcome to the community! > > > > > > > I'm trying to set up a variable amount of watch dirs - i.e when > > something happens execute a command. > > > I've defined watch::config ( $command, $paths, $watchType="recursive", > > $events="default" ) - the specifics aren't that > > important. > > > This has been working ok with $paths just being $path. Now that I've > > switched to an array of paths, > > I'm having some trouble ensuring that all paths exist (if they don't > > the watch fails). I'm unsure how to > > got about this... > > > With one path I could easily ensure it's existence, but with a > > variable amount I just don't know. There > > are, afaik, no looping in puppet (except for erb but that won't do > > it). Perhaps I'm going about this the wrong way... > > > Any tips? > > Resources can take arrays as "title": > > | $paths = [ "/foo", "/bar" ] > | file { $paths: ensure => directory } > > Be aware though, that File doesn't manage the parent directories. If you > need that too, I think there is a recipe on the wiki using mkdir -p in a > define. > > Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---