-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Tower Settings of type on/off idempotency not working #14487
Comments
As documented,
So try this out: - name: SET AWX EXPOSE HOST PATHS
awx.awx.settings:
settings:
AWX_MOUNT_ISOLATED_PATHS_ON_K8S: true
register: this_setting |
This is what I ended up doing and it works. I realize this may not be the most important issue for an open source project of this size, and I wasn't sure if this was intended behavior. So, I reported it. Thank you, Dustin |
Oh, you already mentioned about I've made investigate a bit and found that this is an unintended behavior indeed, so I'll send PR to address this. |
Co-authored-by: Alan Rominger <arominge@redhat.com> Signed-off-by: kurokobo <2920259+kurokobo@users.noreply.github.com>
Co-authored-by: Alan Rominger <arominge@redhat.com> Signed-off-by: kurokobo <2920259+kurokobo@users.noreply.github.com>
Sorry to harass further, but how do I implement the update? I tried installing the collection again using ansible-galaxy but it's telling me that I already have the latest version of the collection? Do these updates and patches get pushed on sprint cycles or something? |
@Dustin-Wi CLI: ansible-galaxy collection install git+https://github.com/ansible/awx.git,devel or by collections:
- name: https://github.com/ansible/awx.git
type: git
version: devel |
@kurokobo Thank you! |
…sible#14489) Signed-off-by: kurokobo <2920259+kurokobo@users.noreply.github.com> Co-authored-by: Alan Rominger <arominge@redhat.com>
…sible#14489) Signed-off-by: kurokobo <2920259+kurokobo@users.noreply.github.com> Co-authored-by: Alan Rominger <arominge@redhat.com>
Please confirm the following
security@ansible.com
instead.)Bug Summary
When trying to set the setting named AWX_MOUNT_ISOLATED_PATHS_ON_K8S to true, no matter what I put in the playbook it is always marked as "changed: true", even if the setting is already true..
Sample Task:
When I change the playbook value and register the results of the task to review the results I get this:
"this_setting": {
"changed": true,
"failed": false,
"new_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": "True"
},
"old_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": true
},
"value": true
}
}
"this_setting": {
"changed": true,
"failed": false,
"new_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": "True"
},
"old_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": true
},
"value": true
}
}
"this_setting": {
"changed": true,
"failed": false,
"new_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": "true"
},
"old_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": true
},
"value": true
}
}
"this_setting": {
"changed": true,
"failed": false,
"new_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": "True"
},
"old_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": true
},
"value": true
}
}
"this_setting": {
"changed": true,
"failed": false,
"new_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": "True"
},
"old_values": {
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": true
},
"value": true
}
}
The documentation says this:
This leads me to believe that the logic used to sanitize the input might be doing a little extra or the conversion of 'settings' parameters to/from name/value parameters.
The documentation does show an example of how to use both the settings parameter and the name/value parameter. So, this may be lower priority but I wanted to get this somewhere that could be search by others who may be running into this issue.
AWX version
23.1.0
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
2.15.4
Operating system
CentOS Stream release 9
Web browser
Firefox
Steps to reproduce
Use a playbook that modifies a boolean setting.
Use the awx.awx.setting module.
Use the name/value parameters instead of the settings paremeter.
Sample:
Expected results
When the setting is already true, idempotency keeps the playbook from trying to update the setting again.
Actual results
Regardless if the setting is true or not, the playbook always updates the setting.
Additional information
No response
The text was updated successfully, but these errors were encountered: