New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service option must_exist disappeared #13259
Comments
I did this, need to look at my notes for exactly why, putting it in my queue to check once back home to review my notes |
There is a PR here ansible/ansible-modules-core#2816 which solves it. I'm manually applying the patch here. |
@bcoca found this issue after following up on some old TODO's I had in my repo regarding |
I still have this issue as of 2.0.2, requiring an ugly workaround. Any suggestions as to how it can be expedited? |
So this was a feature we attemtped to add in devel, but never released, I had to remove it as it seemed to break several existing plays and I never had time to look at the corner cases. In any case there is easy existing workaround using |
I had a related ticket (#16134) that was closed (objectionably) as a duplicate of this one. So I'm copying the core for that ticket here: The issue is that ansible throws an error when stopping/disabling an unknown service. The |
@Hubbitus Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this issue with this template: |
I had fill ansible version, issue type and component name. |
this bug still active? the PR was pulled and i could not see an alternative, right now all disables of non-existant throw errors which i have to ignore |
We have recently made the decision that we plan on leaving the behavior as is (failing when the service does not exist) As discussed in #35293 the correct option here is to use either Logs of that meeting: If you have further questions please stop by IRC or the mailing list:
|
So, you are saying that check mode should always say changed and non-check should always error for this. That just feels very unpolished.. |
I solved my case this way, this feels dumb but i'm limited by what you give me... And it's not portable to systems without systemd. p.s. before you ask, i'm not running the machines naked, i already enabled nftables when this runs.
|
much simpler:
|
ISSUE TYPE
ANSIBLE VERSION
2.0.0-0.6.rc1
COMPONENT NAME
service_module
It was mentioned as became available in ansible 2.0 in doc: http://docs.ansible.com/ansible/service_module.html . It also was work as described.
In recent versions (2.0.0-0.6.rc1) it produce error:
And doc does not contain it.
Is that dropped? Why?
The text was updated successfully, but these errors were encountered: