Issue #18665 has been updated by Stefan Schulte.
Status changed from Unreviewed to Needs More Information
Assignee set to Christian Ruppert
I am not convinced that we need an `onlyif` parameter that will say "only
manage the resource if the resource is present".
I do however think that if you specify that a service should be stopped and
disabled and the service is not even installed anymore, puppet should treat
your resource as in sync. If a service is absent, it will not be running, so in
other words it is stopped.
Can you please post the full error message you are getting? And can you also
post the output of the following command
<pre>
# puppet resource -vd service no_such_service
debug: Service[no_such_service](provider=openrc): Executing '/sbin/rc-service
no_such_service status'
debug: Puppet::Type::Service::ProviderOpenrc: Executing '/bin/rc-status -C -a'
service { 'no_such_service':
ensure => 'stopped',
enable => 'false',
}
</pre>
----------------------------------------
Feature #18665: Service resource: Parameter to ignore non-existing services
https://projects.puppetlabs.com/issues/18665#change-82106
Author: Christian Ruppert
Status: Needs More Information
Priority: Normal
Assignee: Christian Ruppert
Category: service
Target version:
Affected Puppet version:
Keywords:
Branch:
Hey,
it would be really cool to have either an "onlyif" or even a "ignore" option
for the service resource.
Example:
We have some SLES (SuSe Linux Enterprise) systems that install, enable and
start some services after/during a system upgrade and we don't want those
services.
Puppet throws errors when I create some service resources that make sure the
service is actually stopped and disabled because the init script doesn't exist
anymore.
The package has been removed in the same manifest.
Ok, I could write some exec resources or other kinds of helper but I think the
"onlyif" or and "ignore" option would really make sense here for such cases.
Or you want to make sure a package has been removed from the system but there
is no pre/post command during the uninstall phase that makes sure the service
has been stopped prior.
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.