On 09/28/2010 06:17 PM, Dan Urist wrote: > I have the following test code in a manifest: > >> file { >> '/tmp/testdir': >> ensure => directory, >> owner => root, >> group => root, >> mode => 0755, >> checksum => mtime; >> } >> >> exec { >> 'testdir_updated': >> command => 'touch /tmp/testdir_updated', >> subscribe => File['/tmp/testdir'], >> refreshonly => true; >> } > > This doesn't appear to work; i.e. if I touch /tmp/testdir or add a file > to it (which changes the mtime of the directory), the exec doesn't get > run. It runs with every puppetd invocation if I remove 'refreshonly => > true'.
I'm not sure this is how subscribe is supposed to work. Try changing - owner - group - mode of your directory prior to the puppet run. That should trigger the subscription. Also, remove the entire dir. Seeing as puppet is not managing contents, I don't think adding a file or otherwise chaging the checksum will trigger subscriptions. As to how you can make this work in the general case, I have no idea. Cheers, Felix > I'm using puppet v.2.6.1 on Ubuntu Lucid. I could swear this used to > work, and I thought this is/was a common technique. Am I missing > something, or is this a bug? > -- 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.