-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
awx.awx.host enabled should not be passed by default #14461
Comments
I had to squint at the "Actual results" to realize that this was being reported elsewhere. The exact wording really gave me trouble:
You link the That behavior violates existing agreed-upon contracts in the collection, because I gave this thought, and I propose to remove all My proposal would not work if a nullable field existed with a non-null default. In that case, the user would not be able to override a non-null default with a null value on creation. However, I don't think this exists. Nor do I think we are at risk of adding such a field. I don't want the best solution to block the good-enough solution, so I think we should run with the above proposal. |
It's just not really possible. I've tried. I have tried various hacks. I have asked people on Core. There's just really no way, unless Core some day provides a sentinel value that can be used here, that isn't It makes me sad, but it is just a quirk that we kinda have to live with. |
Sounds good, I put up a patch to resolve this #14493 |
Fix merged. For the future - I believe this particular situation should usually only apply to boolean values... but there could be problems with ForeignKey fields as well. I believe that will wait for the present/enforced state options to be fully resolved. |
Please confirm the following
[email protected]
instead.)Bug Summary
If I don't pass the enabled option in the module, it should not be set.
Right now default python bool is false, so as is, the module behaves differently then the API.
https://github.com/ansible/awx/blob/f7a2de8a07dacc6384c8ce81b934d442aa14370a/awx_collection/plugins/modules/host.py#L115C8-L115C28
AWX version
devel
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
N/A
Operating system
N/A
Web browser
No response
Steps to reproduce
Use host module.
Expected results
If I don't pass the enabled option in the module, it should not be set.
Right now default python bool is false, so as is, the module behaves differently then the API.
Actual results
Host is added but it is not enabled.
Additional information
No response
The text was updated successfully, but these errors were encountered: