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
xfconf: "get": don't set changed flag, don't require value #48331
Conversation
This change removes the need to pass a value when state equals "get" (it can still be passed -- it'll just be ignored, same as before), and makes sure that "get" always leaves the changed flag at false. Below is a short ansible playbook for an XFCE4 machine that demonstrates both these behaviors and runs cleanly with the updated xfconf.py. (Also, thank you very much to @jbenden for creating this module!) --- - hosts: 127.0.0.1 connection: local tasks: - name: Fetch the theme xfconf: channel: xfwm4 property: "/general/theme" state: get value: '' register: theme - debug: msg: "The theme is {{ theme.ansible_facts.xfconf.new_value }}" - name: Fetch the theme in a way that will blow up xfconf: channel: xfwm4 property: "/general/theme" state: get
Hi @mattiklock, thank you for submitting this pull-request! |
@mattiklock This PR contains |
The test
The test
|
pylint caught whitespace on 184
if value.lower() == "true": | ||
value = "true" | ||
elif value.lower() == "false": | ||
value = "false" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker, but a simpler check would be
if value.lower() in ('true', 'false'):
value = value.lower()
Any chance this gets merged in the near future? It is quite a small change (one of the zillions you have, I know). Just a friendly check. |
This PR will be superseded by #62578 |
Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.
For further information, please see: |
SUMMARY
This change removes the need to pass a value when state equals "get" (it can still be passed -- it'll just be ignored, same as before), and makes sure that "get" always leaves the changed flag at false.
Below is a short ansible playbook for an XFCE4 machine that demonstrates both these behaviors and runs cleanly with the updated xfconf.py.
(Also, thank you very much to jbenden for creating this module!)
ISSUE TYPE
COMPONENT NAME
xfconf
ANSIBLE VERSION