diff --git a/changelogs/fragments/4999-xfconf-bool.yml b/changelogs/fragments/4999-xfconf-bool.yml new file mode 100644 index 0000000000..8fcf27144e --- /dev/null +++ b/changelogs/fragments/4999-xfconf-bool.yml @@ -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)." diff --git a/plugins/module_utils/xfconf.py b/plugins/module_utils/xfconf.py index 4028da3bef..5a4b4f05c6 100644 --- a/plugins/module_utils/xfconf.py +++ b/plugins/module_utils/xfconf.py @@ -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