FAQ
When chaining execs together, and wanting to ensure that exec
resources are not executed on every puppet run, which method is
better? Using unless/onlyif or subscribe/refreshonly?

With unless/onlyif, the exec is evaluated every time. With
subscribe/refreshonly, the exec is only executed when a dependent
resource changes....

Doug.

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

Search Discussions

  • Jcbollinger at Aug 17, 2012 at 9:01 pm

    On Friday, August 17, 2012 11:23:46 AM UTC-5, Douglas wrote:
    When chaining execs together, and wanting to ensure that exec
    resources are not executed on every puppet run, which method is
    better? Using unless/onlyif or subscribe/refreshonly?

    With unless/onlyif, the exec is evaluated every time. With
    subscribe/refreshonly, the exec is only executed when a dependent
    resource changes....

    Neither mechanism is better than the other in any general sense. They
    serve different purposes, and it is uncommon that both are applicable to
    any given configuration objective.

    The 'unless' and 'onlyif' (and 'creates') parameters serve as means for an
    Exec to determine whether it is already in sync. If it is, then its
    command will not be run, in the same way that a File that is already in
    sync will not redundantly download its content. This should also have
    implications for reports, etc.. The 'unless' and/or 'ifonly' commands must
    run every time, though.

    The 'refreshonly' parameter, on the other hand, makes application of the
    Exec conditional on (and subsequent to) one or more other resources
    changing, sort of like an 'on update' trigger in a database.

    In any given case, you should use whichever approach makes sense.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ogvL-ymc10sJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Douglas Garstang at Aug 17, 2012 at 9:23 pm

    On Fri, Aug 17, 2012 at 2:01 PM, jcbollinger wrote:
    On Friday, August 17, 2012 11:23:46 AM UTC-5, Douglas wrote:

    When chaining execs together, and wanting to ensure that exec
    resources are not executed on every puppet run, which method is
    better? Using unless/onlyif or subscribe/refreshonly?

    With unless/onlyif, the exec is evaluated every time. With
    subscribe/refreshonly, the exec is only executed when a dependent
    resource changes....


    Neither mechanism is better than the other in any general sense. They serve
    different purposes, and it is uncommon that both are applicable to any given
    configuration objective.

    The 'unless' and 'onlyif' (and 'creates') parameters serve as means for an
    Exec to determine whether it is already in sync. If it is, then its command
    will not be run, in the same way that a File that is already in sync will
    not redundantly download its content. This should also have implications
    for reports, etc.. The 'unless' and/or 'ifonly' commands must run every
    time, though.

    The 'refreshonly' parameter, on the other hand, makes application of the
    Exec conditional on (and subsequent to) one or more other resources
    changing, sort of like an 'on update' trigger in a database.

    In any given case, you should use whichever approach makes sense.
    I think...and I might be wrong because I'm a little sleep deprived
    today, that it seems like you just said the same thing twice...

    Doug.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 17, '12 at 4:23p
activeAug 17, '12 at 9:23p
posts3
users2
websitepuppetlabs.com

2 users in discussion

Douglas Garstang: 2 posts Jcbollinger: 1 post

People

Translate

site design / logo © 2022 Grokbase