mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
snap: add RV version (#9598)
* snap: add RV version * add chglog frag * fix typo * fix docs * add missing import * fix sanity * more fixes * Update plugins/modules/snap.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/snap_alias.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -41,8 +41,15 @@ def snap_runner(module, **kwargs):
|
||||
options=cmd_runner_fmt.as_list(),
|
||||
info=cmd_runner_fmt.as_fixed("info"),
|
||||
dangerous=cmd_runner_fmt.as_bool("--dangerous"),
|
||||
version=cmd_runner_fmt.as_fixed("version"),
|
||||
),
|
||||
check_rc=False,
|
||||
**kwargs
|
||||
)
|
||||
return runner
|
||||
|
||||
|
||||
def get_version(runner):
|
||||
with runner("version") as ctx:
|
||||
rc, out, err = ctx.run()
|
||||
return dict(x.split() for x in out.splitlines() if len(x.split()) == 2)
|
||||
|
||||
Reference in New Issue
Block a user