From e43a9b697454a6e460a32498610ada259900e138 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 21:33:05 +0200 Subject: [PATCH] xfconf: added missing value types (#4534) (#4541) * xfconf: added missing value types * added changelog fragment * Update plugins/modules/system/xfconf.py Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein (cherry picked from commit a2bfb9621337c81582bd8c22f72e5f2eea881d5c) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- .../4534-xfconf-added-value-types.yaml | 2 ++ plugins/modules/system/xfconf.py | 19 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/4534-xfconf-added-value-types.yaml diff --git a/changelogs/fragments/4534-xfconf-added-value-types.yaml b/changelogs/fragments/4534-xfconf-added-value-types.yaml new file mode 100644 index 0000000000..152c554349 --- /dev/null +++ b/changelogs/fragments/4534-xfconf-added-value-types.yaml @@ -0,0 +1,2 @@ +minor_changes: + - xfconf - added missing value types ``char``, ``uchar``, ``int64`` and ``uint64`` (https://github.com/ansible-collections/community.general/pull/4534). diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 6ad24cdeb6..c25041d5f1 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -57,9 +57,10 @@ options: element in the array, then I(force_array=true) must be used to ensure that C(xfconf-query) will interpret the value as an array rather than a scalar. + - Support for C(uchar), C(char), C(uint64), and C(int64) has been added in community.general 4.8.0. type: list elements: str - choices: [ int, uint, bool, float, double, string ] + choices: [ string, int, double, bool, uint, uchar, char, uint64, int64, float ] state: type: str description: @@ -177,15 +178,13 @@ class XFConfProperty(CmdStateModuleHelper): facts_params = ('property', 'channel', 'value') module = dict( argument_spec=dict( - state=dict(default="present", - choices=("present", "get", "absent"), - type='str'), - channel=dict(required=True, type='str'), - property=dict(required=True, type='str'), - value_type=dict(required=False, type='list', - elements='str', choices=('int', 'uint', 'bool', 'float', 'double', 'string')), - value=dict(required=False, type='list', elements='raw'), - force_array=dict(default=False, type='bool', aliases=['array']), + state=dict(type='str', choices=("present", "get", "absent"), default="present"), + channel=dict(type='str', required=True), + property=dict(type='str', required=True), + value_type=dict(type='list', elements='str', + choices=('string', 'int', 'double', 'bool', 'uint', 'uchar', 'char', 'uint64', 'int64', 'float')), + value=dict(type='list', elements='raw'), + force_array=dict(type='bool', default=False, aliases=['array']), disable_facts=dict(type='bool', default=True), ), required_if=[('state', 'present', ['value', 'value_type'])],