Issue #1798 has been updated by Ido Rosen.
I'd like to see this issue addressed - there are some environments where I
can't use puppet because this purge-all-except-declared-resources feature does
not exist. It may partly require some modification of existing providers such
as package/service providers, or the method of enumeration of resources. I
don't have the time these days to work on it - but it's all yours if you want
it!
----------------------------------------
Bug #1798: Fix to allow resources {service: purge => true}...
https://projects.puppetlabs.com/issues/1798#change-73523
Author: Ido Rosen
Status: Re-opened
Priority: Normal
Assignee: Nigel Kersten
Category:
Target version:
Affected Puppet version: 0.24.6
Keywords:
Branch:
The service resource type needs an ensure => absent option so that it is
compatible with purging of unmanaged entries. Here's a patch to add an alias
for it. I've tested this patch. In lieu of changing the way purging of
unmanaged entries works, perhaps there should be a requirement that types
support ensure => absent?
resources { service: purge => true } # will disable all services not explicitly
enabled in your manifest after applying this patch, ensuring only the services
you want running are indeed running...
Here's the patch:
<pre>
diff --recursive --unified puppet-0.24.6.orig/lib/puppet/type/service.rb
puppet-0.24.6/lib/puppet/type/service.rb
--- puppet-0.24.6.orig/lib/puppet/type/service.rb 2008-07-08
09:46:19.000000000 -0400
+++ puppet-0.24.6/lib/puppet/type/service.rb 2008-12-05 12:25:03.000000000
-0500
@@ -64,6 +64,10 @@
aliasvalue(:false, :stopped)
aliasvalue(:true, :running)
+ # in order to make resources { service: purge => true } work
+ # properly every type should support ensure => absent.
+ aliasvalue(:absent, :stopped)
+
def retrieve
return provider.status
end
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.