Open kk-at-redhat opened 8 months ago
after looking back at the previous issue, this might be how check mode is interpreting present
since it is set as default. Check mode might be a fresh environment every time so with the default state as present on these modules, check mode is reporting back that yes I would make the change. I am not sure if check mode necessarily should be idempotent in this sense.
I'm sorry, I can't agree with that. If all provided fields are the same in the existing object, Ansible should be reporting "OK" in both real and check mode. Just like all the other modules in this collection do.
Some modules are wrong and we should absolutely change that so the behavior is consistent across the collection but check mode at its definition is not idempotent. We are not actually changing anything so therefore, the change will "always" occur in a check run because it has no concept of the previous check run.
I will amend my previous statement that the 2 issues you opened are separate completely #14923 and I will answer separately there.
I would open a new issue for the entire collection and close this one since this is more specific to these modules when in reality, the whole collection has issues around our inconsistent support of check mode.
Actually, most of the modules I worked with so far are fine.
These work as expected: template, project, organization, group, credential type, credential (without password), inventory source, user (without password), instance group, settings.
I'll try to contribute if I have some free cycles.
Please confirm the following
security@ansible.com
instead.)Bug Summary
Inventory and Host modules will report "ok" in real mode but "changed" in --check mode
AWX version
23.2.0
Select the relevant components
Installation method
docker development environment
Modifications
no
Ansible version
2.14.2
Operating system
Red Hat Enterprise Linux release 9.1 (Plow)
Web browser
Chrome
Steps to reproduce
Expected results
Actual results
Additional information
No response