Repository: ansible-collections/community.general

Issue:
Unable to set `bool` value in Xfce4 configuration
### Summary

I'm trying to set the bool value `/general/SaveOnExit` in `xfce4-session` to `false`. Ansible says it performs this change successfully, but the value remains unchanged after running the task.

### Issue Type

Bug Report

### Component Name

community.general.xfconf

### Ansible Version

```console (paste below)
ansible [core 2.13.2]
  config file = None
  configured module search path = ['/home/oliver/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/oliver/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/oliver/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/oliver/.local/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
  jinja version = 3.1.2
  libyaml = True
```


### Community.general Version

```console (paste below)
# /home/oliver/.local/lib/python3.9/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 5.3.0  
```


### Configuration

```console (paste below)
$ ansible-config dump --only-changed

```
_empty_

### OS / Environment

Debian 11 Xfce4

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Don't save session on exit
  community.general.xfconf:
    channel: xfce4-session
    property: /general/SaveOnExit
    value_type: bool
    value: "false"
```


### Expected Results

I expected that the "Save session for future logins" option in the logout dialog is disabled by default. More technically, I expect `xfconf-query -c xfce4-session -p /general/SaveOnExit` to return `false`.

### Actual Results

Whenever I run the above task, it will indicate that it _changed_ the value. But when I check the value, it's unchanged.

When I manually execute the module, after retaining it with `ANSIBLE_KEEP_REMOTE_FILES=1`, I always get the exact some output, no matter how often I run it. It always says it changed the value from `true` to `false`, but subsequent checks clearly indicate the value is unchanged.
```shell
$ python3 AnsiballZ_xfconf.py execute

{"changed": true, "channel": "xfce4-session", "property": "/general/SaveOnExit", "value": "false", "previous_value": "true", "type": "bool", "is_array": false, "failed": false, "invocation": {"module_args": {"channel": "xfce4-session", "property": "/general/SaveOnExit", "value_type": ["bool"], "value": ["false"], "state": "present", "force_array": false, "disable_facts": true}}}
```

Additionally, if I just use a `ansible.builtin.command: xfconf-query -c xfce4-session -p /general/SaveOnExit -t bool -s false -n` instead, I get my resulting behavior and the value is instantly changed.

Sadly I don't understand enough of Ansible yet to see how things could be going wrong from here.

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/system/xfconf.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/system/xfconf.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @jbenden @russoz
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->
I can reproduce this. For me, the command run by the module is `['/usr/bin/xfconf-query', '--channel', 'xfce4-session', '--property', '/general/SaveOnExit', '--create', '--type', 'bool', '--set', 'False']`. Note the `False` instead of `false`.

Adding `value = 'true' if value else 'false'` as line 18 of plugins/module_utils/xfconf.py solves the problem for me. I think https://github.com/ansible-collections/community.general/commit/8ba3d9474055450fce493f1b707ae707df144dbd introduced this problem.

Resolving patch:
diff --git a/plugins/module_utils/xfconf.py b/plugins/module_utils/xfconf.py
--- 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
 


Test patch: