Thomas Biddle
2012-Nov-05 21:03 UTC
[Puppet Users] Run Exec without notifying Puppet as a change
I just switched from an in-house APT module to the Puppetlabs one thinking that it may solve this, but after looking at the code (And installing to confirm) it did not. Seeing Puppet be notified of a "change" just when `apt-get update` is run is a bit annoying to me. I was wondering if there was a way to avoid notifying Puppet of a change when an Exec command is run? (Or if there''s another way we can run this) TJ -- 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/-/fN1guXxULUMJ. 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.
llowder
2012-Nov-05 22:00 UTC
[Puppet Users] Re: Run Exec without notifying Puppet as a change
On Monday, November 5, 2012 3:03:57 PM UTC-6, Thomas Biddle wrote:> > I just switched from an in-house APT module to the Puppetlabs one thinking > that it may solve this, but after looking at the code (And installing to > confirm) it did not. > > Seeing Puppet be notified of a "change" just when `apt-get update` is run > is a bit annoying to me. I was wondering if there was a way to avoid > notifying Puppet of a change when an Exec command is run? (Or if there''s > another way we can run this) > >TJ>ONly way I know of is to use a fake exec (calling /bin/true or /bin/false (so it''ll raise an error if it does get called) or something like that.) and use an only if with the real command (the update). -- 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/-/rSh7yc3i0psJ. 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.
jcbollinger
2012-Nov-06 14:48 UTC
[Puppet Users] Re: Run Exec without notifying Puppet as a change
On Monday, November 5, 2012 3:03:57 PM UTC-6, Thomas Biddle wrote:> > I just switched from an in-house APT module to the Puppetlabs one thinking > that it may solve this, but after looking at the code (And installing to > confirm) it did not. > > Seeing Puppet be notified of a "change" just when `apt-get update` is run > is a bit annoying to me. I was wondering if there was a way to avoid > notifying Puppet of a change when an Exec command is run? (Or if there''s > another way we can run this) > >It *is* a change. The system goes from a state of ''apt-get update'' not having been run (in some given time frame) to a state in which it has been run. That''s the way it works for Execs. In general, what you can do is use one or more of the Exec''s ''unless'', ''onlyif'', or ''creates'' properties to define whether the Exec needs to run at all, and / or you can set "refreshonly => true" so that it has to receive an event from some other resource before it will run. You can also set a schedule on it to reduce the frequency at which it is applied. You will have to judge for yourself whether any of those alternatives is applicable to your particular situation. 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/-/gkflyoexFYoJ. 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.