mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 22:50:19 -07:00
[PR #9226/b429e8a2 backport][stable-10] xfconf/xfconf_info: add return value version (#9359)
xfconf/xfconf_info: add return value version (#9226)
* xfconf/xfconf_info: add return value version
* add changelog frag
* adapt test to helper improvements
* rollback copyright update
* replace tab with spaces in test yamls
(cherry picked from commit b429e8a2cf
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
12f2d71950
commit
92e4bd184d
6 changed files with 121 additions and 21 deletions
|
@ -118,10 +118,17 @@ value_array:
|
|||
- Main
|
||||
- Work
|
||||
- Tmp
|
||||
version:
|
||||
description:
|
||||
- The version of the C(xfconf-query) command.
|
||||
returned: success
|
||||
type: str
|
||||
sample: 4.18.1
|
||||
version_added: 10.2.0
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
|
||||
from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner
|
||||
from ansible_collections.community.general.plugins.module_utils.xfconf import xfconf_runner, get_xfconf_version
|
||||
|
||||
|
||||
class XFConfInfo(ModuleHelper):
|
||||
|
@ -139,6 +146,7 @@ class XFConfInfo(ModuleHelper):
|
|||
|
||||
def __init_module__(self):
|
||||
self.runner = xfconf_runner(self.module, check_rc=True)
|
||||
self.vars.version = get_xfconf_version(self.runner)
|
||||
self.vars.set("list_arg", False, output=False)
|
||||
self.vars.set("is_array", False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue