Hi I am using puppet to mirror a directory of files, if any of these change then processes need to be restarted.
class snort { package { ["snort", "perl-Archive-Tar", "barnyard2", "perl-libwww-perl", "perl- Crypt-SSLeay"]: ensure => present; } # package user{ "snort": managehome => true, home => '/home/snort', ensure => present; } file { "/home/snort/Rules/raw/": mode => "640", owner => snort, group => snort, source => 'puppet:///modules/snort/Rules/raw', recurse => true, recurselimit => 1, backup => false, ensure => present; } } This mirrors the files fine.... in another class: class monitor { class pulledpork ( $master) { exec { "/home/snort/bin/pulledpork -nc conf/$master/pp.conf": cwd => "/home/snort", subscribe => [File["/home/snort/conf/$master/pp", "/home/ snort/Rules/raw"] ], notify => Service["snort.$master"], user => "snort"; } } ....... } i.e. what I want to do is run pulled pork if its config or any of the raw rule files change. What happens is that PP gets run every time: notice: /Stage[main]/Snort/File[/home/snort/Rules/raw]/checksum: checksum changed '{mtime}Fri Dec 10 16:02:04 +1300 2010' to '{mtime} Fri Dec 10 16:05:00 +1300 2010' info: /Stage[main]/Snort/File[/home/snort/Rules/raw]: Scheduling refresh of Exec[/home/snort/bin/pulledpork -nc conf/dmzi/pp.conf] it would seem that each time puppet runs the mtime on the directory is changed and this triggers an event next time... How should I work around this? I would rather not enumerate all the files in the directory... Thanks, Russell. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.