Issue #5414 has been updated by Nigel Kersten.

I can't get this to work in 0.25.5 either.

<pre>
ni...@debvm1:~/pkgs/0.25.5$ rm -Rf /tmp/file_test/
ni...@debvm1:~/pkgs/0.25.5$ puppet --version
0.25.5
ni...@debvm1:~/pkgs/0.25.5$ cat /tmp/test.pp 
file { "/tmp/file_test":
  ensure   => directory,
  recurse  => true,
  checksum => mtime,
  mode     => 644,
  notify   => Exec["tar"],
}

exec { "/bin/tar -cf - /tmp/file_test > /dev/null": 
  alias => "tar",
  refreshonly => true,
}
ni...@debvm1:~/pkgs/0.25.5$ puppet -v /tmp/test.pp 
info: Applying configuration version '1292304870'
notice: //File[/tmp/file_test]/ensure: created
info: //File[/tmp/file_test]: Scheduling refresh of Exec[/bin/tar -cf - 
/tmp/file_test > /dev/null]
notice: //Exec[/bin/tar -cf - /tmp/file_test > /dev/null]: Triggering 'refresh' 
from 1 dependencies
ni...@debvm1:~/pkgs/0.25.5$ puppet -v /tmp/test.pp 
info: Applying configuration version '1292304876'
ni...@debvm1:~/pkgs/0.25.5$ mkdir /tmp/file_test/{1,2,3,4,5,6}
ni...@debvm1:~/pkgs/0.25.5$ puppet -v /tmp/test.pp 
info: Applying configuration version '1292304893'
</pre>

Are you positive the example in the bug report originally worked?


----------------------------------------
Bug #5414: file resource can't be used to monitor file changes recursively
https://projects.puppetlabs.com/issues/5414

Author: Ben -
Status: Investigating
Priority: High
Assignee: Nigel Kersten
Category: file
Target version: 
Affected Puppet version: 2.6.3
Keywords: 
Branch: 


for a long time i have used puppet to monitor a directory recursively for file 
changes but since upgrading to 2.6 that doesn't appear to work.

    # file_test.pp
    file { "/tmp/file_test":
    ensure => directory, recurse => true,
    checksum => mtime, mode => 644, notify => Exec["tar"];
    }
    exec { "/bin/tar -cf - /tmp/file_test > /dev/null": alias => "tar", 
refreshonly => true; }

Using the above manifest the following does not act as expected.

    puppet apply --verbose file_test.pp # creates /tmp/file_test and runs exec 
as expected
    mkdir /tmp/file_test/{1,2,3,4,5,6}
    puppet apply --verbose file_test.pp # does nothing, should run exec
    puppet apply --verbose file_test.pp # does nothing, should do nothing
    touch /tmp/file_test/{1,2,3,4,5,6}/{10,11,12,15}
    puppet apply --verbose file_test.pp # does nothing, should run exec




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to