Hi all,
I'm clearly missing something here. I thought that if I had a
subscribe attribute on an exec resource, then that resource would run
regardless on any creates/unless, but that is not what I'm seeing.
I created a minimal test, shown below. As you can see:
- The file 'trigger' was changed, and Puppet noticed.
- The exec was 'refreshed' due to the dependency, but it didn't
actually run.
- Without the 'creates' file, the exec runs correctly.
Is this expected behaviour? From the docs it looks like a 'refresh' of
an exec should run the exec again, unless the 'refresh' attribute is
specified. (I tried that too, and it made no difference).
Thanks,
Graham
gra...@mini:~/puppettest$ cat notification.pp
file { "/Users/graham/puppettest/trigger":
content => 'c',
}
exec { "echo potato > output":
subscribe => File['/Users/graham/puppettest/trigger'],
creates => '/Users/graham/puppettest/creates',
path => '/bin/',
}
gra...@mini:~/puppettest$ puppet notification.pp
notice: //File[/Users/graham/puppettest/trigger]: Filebucketed to
with sum 0cc175b9c0f1b6a831c399e269772661
notice: //File[/Users/graham/puppettest/trigger]/content: content
changed '{md5}0cc175b9c0f1b6a831c399e269772661' to
'{md5}4a8a08f09d37b73795649038408b5f33'
notice: //Exec[echo potato > output]: Triggering 'refresh' from 1
dependencies
gra...@mini:~/puppettest$ ls
creates notification trigger
gra...@mini:~/puppettest$ rm creates
gra...@mini:~/puppettest$ puppet notification.pp
notice: //Exec[echo potato > output]/returns: executed successfully
gra...@mini:~/puppettest$ ls
notification output trigger
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---