Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Notify two exec resources or better use subcribe?

$
0
0
Hi, I'm looking for the best option to do something like: tidy { '/parent-path-tidy-should-do-something': recurse => 3, matches => [ 'search-string1', 'search-string2', 'search-string3'], rmdirs => false, notify => [ Exec['my-exec1'], Exec['my-exec2'] ]; } exec {'my-exec1': cwd => '/sbin', path => '/sbin', command => 'my-command1', refreshonly => true, } exec {'my-exec2': cwd => '/sbin', path => '/sbin', command => 'my-command2', refreshonly => true, } Basically tidy is doing what it should but it seems like that the second exec will be ignored somehow. I just tested the command on the host after other classes based on this one failed becasue the command did not run. After execute the command manually and trigger another puppet run everything is fine so I'm pretty sure that the command was not triggered/notified correctly. Is there any more clean way to ensure that both "execs" will be executed correctly? I'm not sure if using an aray of execs is fully supported? (at least it does not produce any error) Eventually it is better to use subscribe (to the same tidy resource) in both execs? Thanks for any advice

Viewing all articles
Browse latest Browse all 6104

Trending Articles