Skip to content

Commit

Permalink
xfconf: fix setting of boolean values (ansible-collections#5007)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored and Dušan Markovič committed Nov 7, 2022
1 parent 02bee98 commit cb1ee2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/4999-xfconf-bool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "xfconf - fix setting of boolean values (https://github.com/ansible-collections/community.general/issues/4999, https://github.com/ansible-collections/community.general/pull/5007)."
2 changes: 1 addition & 1 deletion plugins/module_utils/xfconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _values_fmt(values, value_types):
result = []
for value, value_type in zip(values, value_types):
if value_type == 'bool':
value = boolean(value)
value = 'true' if boolean(value) else 'false'
result.extend(['--type', '{0}'.format(value_type), '--set', '{0}'.format(value)])
return result

Expand Down

0 comments on commit cb1ee2b

Please sign in to comment.