[PR #9598/f27d5e7a backport][stable-10] snap: add RV version (#9606)

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>
(cherry picked from commit f27d5e7a42)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-01-22 20:51:27 +01:00 committed by GitHub
parent ed472d8291
commit 45f7661249
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 57 additions and 11 deletions

View file

@ -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)