gconftool2/gconftool2_info: add return value version (#9064)

* add return value version

* add changelog frag
This commit is contained in:
Alexei Znamensky 2024-10-27 21:36:52 +13:00 committed by GitHub
commit ce1b9887b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 64 additions and 2 deletions

View file

@ -50,6 +50,12 @@ value:
returned: success
type: str
sample: Monospace 10
version:
description: Version of gconftool-2.
type: str
returned: always
sample: "3.2.6"
version_added: 10.0.0
"""
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
@ -68,6 +74,9 @@ class GConftoolInfo(ModuleHelper):
def __init_module__(self):
self.runner = gconftool2_runner(self.module, check_rc=True)
with self.runner("version") as ctx:
rc, out, err = ctx.run()
self.vars.version = out.strip()
def __run__(self):
with self.runner.context(args_order=["state", "key"]) as ctx: