mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-02 06:19:10 -07:00
gconftool2/gconftool2_info: add return value version (#9064)
* add return value version * add changelog frag
This commit is contained in:
parent
107df41d9c
commit
ce1b9887b1
6 changed files with 64 additions and 2 deletions
|
@ -96,6 +96,12 @@ previous_value:
|
|||
returned: success
|
||||
type: str
|
||||
sample: "Serif 12"
|
||||
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 StateModuleHelper
|
||||
|
@ -129,6 +135,10 @@ class GConftool(StateModuleHelper):
|
|||
if not self.vars.direct and self.vars.config_source is not None:
|
||||
self.do_raise('If the "config_source" is specified then "direct" must be "true"')
|
||||
|
||||
with self.runner("version") as ctx:
|
||||
rc, out, err = ctx.run()
|
||||
self.vars.version = out.strip()
|
||||
|
||||
self.vars.set('previous_value', self._get(), fact=True)
|
||||
self.vars.set('value_type', self.vars.value_type)
|
||||
self.vars.set('_value', self.vars.previous_value, output=False, change=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue