Re: [Puppet Users] exec resource not refreshed when subscribed resource changes

Felix Frank
Thu, 21 Mar 2013 10:37:09 -0000

Hi,

On 03/14/2013 09:25 AM, Keith Burdis wrote:
> 2) Adding refreshonly => true to the exec.
>
> 3) Remove the creates and subscribe  from the exec.
>

The subscribe is actually fine, but yes - the ''creates'' needs
to go in
order to allow repeated execution.

Note that this can be considered unclean manifest design, because
a) notifications can get lost during agent crashes (if you''re unlucky)
and
b) if the exec fails, puppet will likely not notify again next time,
which is a painful and not at all unlikely failure scenario.

Ideally, you could construct a "dynamic" creates or unless clause,
that
will enable puppet to always infer wether the exec need running or not.