From 4a1d86c47ed1c55ff888d21b8718b442a0a69f84 Mon Sep 17 00:00:00 2001 From: Pierre Roudier Date: Tue, 28 Jul 2020 07:40:40 +0000 Subject: [PATCH] Added uint type to xfconf module (#696) * Added uint type to xfconf module * Update changelogs/fragments/xfconf_add_uint_type.yml Updated PR number in changelog Co-authored-by: Felix Fontein Co-authored-by: Pierre Roudier Co-authored-by: Felix Fontein --- changelogs/fragments/xfconf_add_uint_type.yml | 2 ++ plugins/modules/system/xfconf.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/xfconf_add_uint_type.yml diff --git a/changelogs/fragments/xfconf_add_uint_type.yml b/changelogs/fragments/xfconf_add_uint_type.yml new file mode 100644 index 0000000000..7022a3404b --- /dev/null +++ b/changelogs/fragments/xfconf_add_uint_type.yml @@ -0,0 +1,2 @@ +minor_changes: + - xfconf - add support for ``uint`` type (https://github.com/ansible-collections/community.general/pull/696). diff --git a/plugins/modules/system/xfconf.py b/plugins/modules/system/xfconf.py index 90b3b2b698..eacb6502e3 100644 --- a/plugins/modules/system/xfconf.py +++ b/plugins/modules/system/xfconf.py @@ -44,7 +44,7 @@ options: For array mode, use a list of types. type: list elements: str - choices: [ int, bool, float, string ] + choices: [ int, uint, bool, float, string ] state: description: - The action to take upon the property/value. @@ -124,7 +124,7 @@ class XfConfProperty(object): GET = "get" RESET = "absent" VALID_STATES = (SET, GET, RESET) - VALID_VALUE_TYPES = ('int', 'bool', 'float', 'string') + VALID_VALUE_TYPES = ('int', 'uint', 'bool', 'float', 'string') previous_value = None is_array = None