Right now if you stop a service which isn't installed you get an error.

service: name=kube-apiserver state=stopped


.. if the kube-apiservice service isn't installed it will just fail.

It shouldn't fail.  It's 'stopped' which is the same as not existing in a
way.

I need this for un-installation of software.

I want an idempotent script that stops all the services, removes the
packages, and removes the config files.

Right now I can't do this as ansible isn't idempotent for some operations.

I reported a bug for this and it was rejected because there could be a
spelling error in the name.

Which is somewhat true.

but then what about this?

- apt: name=kubernetes-server state=absent


that will succeed if you have a spelling error in the name.

So let's be consistent here? Which one is it?

Perhaps we need some more states to resolve this?

Maybe an 'absent' on 'service' which will 'stop' the service?  the only
problem is that it's not 'absent' at that point.



-- 
[image: 1_Primary_logo_on_transparent_268x67.png]

Affordable, scalable, and managed Elasticsearch and Cassandra clusters
deployed on bare metal.

Kevin Burton
Founder/CEO Scalefastr <https://www.scalefastr.io>
Location: *San Francisco, CA*

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADKGWzs6nDTWExPE8vtVrb9RwWeh2xyabtRxVoruSiGBJwbYDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to