Randall Hansen
2011-May-20 20:17 UTC
[Puppet Users] PC EU feedback: ability to remove all unmanaged resources
http://projects.puppetlabs.com/issues/7600 I call this the "agent orange" option :) This works, purging all unmanaged hosts entries: resources { ''host'': purge => true, noop => true, } We should have a similar property for all (most?) types. Please comment on the ticket or reply here, whichever you prefer. Thanks! r P.S. This is in response to feedback from my "Improving the Puppet DSL" session at Puppet Camp EU, 2011. This ticket isn''t a promise we will take action, but we could very much like comment and discussion from you good people. -- 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.
jcbollinger
2011-May-20 22:15 UTC
[Puppet Users] Re: PC EU feedback: ability to remove all unmanaged resources
On May 20, 3:17 pm, Randall Hansen <rand...@puppetlabs.com> wrote:> http://projects.puppetlabs.com/issues/7600 > > I call this the "agent orange" option :) > > This works, purging all unmanaged hosts entries: > > resources { ''host'': > purge => true, > noop => true, > } > > We should have a similar property for all (most?) types. > > Please comment on the ticket or reply here, whichever you prefer.I don''t understand. I didn''t think the "resources" meta-resource was specific to use with the ''host'' resource type. Are there any resource types that it *doesn''t* work with? John -- 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.
Patrick Mohr
2011-May-21 07:11 UTC
Re: [Puppet Users] Re: PC EU feedback: ability to remove all unmanaged resources
On Fri, May 20, 2011 at 3:15 PM, jcbollinger <John.Bollinger@stjude.org>wrote:> > > On May 20, 3:17 pm, Randall Hansen <rand...@puppetlabs.com> wrote: > > http://projects.puppetlabs.com/issues/7600 > > > > I call this the "agent orange" option :) > > > > This works, purging all unmanaged hosts entries: > > > > resources { ''host'': > > purge => true, > > noop => true, > > } > > > > We should have a similar property for all (most?) types. > > > > Please comment on the ticket or reply here, whichever you prefer. > > > I don''t understand. I didn''t think the "resources" meta-resource was > specific to use with the ''host'' resource type. Are there any resource > types that it *doesn''t* work with? >Err, I assume (hope) it doesn''t work with Augeas or File. I''d guess Package is too dangerous to be useful, but I could be wrong. -- 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.
jcbollinger
2011-May-23 13:11 UTC
[Puppet Users] Re: PC EU feedback: ability to remove all unmanaged resources
On May 21, 2:11 am, Patrick Mohr <kc7...@gmail.com> wrote:> On Fri, May 20, 2011 at 3:15 PM, jcbollinger <John.Bollin...@stjude.org>wrote: > > > On May 20, 3:17 pm, Randall Hansen <rand...@puppetlabs.com> wrote: > > >http://projects.puppetlabs.com/issues/7600 > > > > I call this the "agent orange" option :) > > > > This works, purging all unmanaged hosts entries: > > > > resources { ''host'': > > > purge => true, > > > noop => true, > > > } > > > > We should have a similar property for all (most?) types. > > > > Please comment on the ticket or reply here, whichever you prefer. > > > I don''t understand. I didn''t think the "resources" meta-resource was > > specific to use with the ''host'' resource type. Are there any resource > > types that it *doesn''t* work with? > > Err, I assume (hope) it doesn''t work with Augeas or File. I''d guess Package > is too dangerous to be useful, but I could be wrong.Puppet is a powerful tool. If you use a powerful tool incorrectly, you can get powerfully hurt. All flippancy aside, my point is that the issue appears to be misconceived. To the best of my knowledge, the "resources" metaresource does work with all resource types, at least in principle. I imagine that in practice there are resource types that it cannot purge, as a result of those types'' implementation details, and I suspect File and Augeas are among those. But that''s not what I was talking about. Perhaps the question would make more sense if posed in a positive sense: "Is the Resources type explicitly limited to working with only a subset of the available resource types?" I thought the answer was "no." Furthermore, some resource types do have type-specific purging at one scope or another. File is among them. John -- 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.