1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-19 10:21:30 +00:00

[PR #11682/b79a4575 backport][stable-12] snap_connect: new module to manage snap interface connections (#11722)

snap_connect: new module to manage snap interface connections (#11682)

* snap_connect: new module to manage snap interface connections

Fixes #7722



* simplify _get_connections()

---------


(cherry picked from commit b79a45753f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
patchback[bot] 2026-04-03 07:35:13 +02:00 committed by GitHub
parent cac85a5480
commit 83aa142331
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 302 additions and 0 deletions

View file

@ -45,6 +45,10 @@ def snap_runner(module: AnsibleModule, **kwargs) -> CmdRunner:
info=cmd_runner_fmt.as_fixed("info"),
dangerous=cmd_runner_fmt.as_bool("--dangerous"),
version=cmd_runner_fmt.as_fixed("version"),
_connect=cmd_runner_fmt.as_func(lambda v: ["connect", v]),
_disconnect=cmd_runner_fmt.as_func(lambda v: ["disconnect", v]),
_connections=cmd_runner_fmt.as_fixed("connections"),
slot=cmd_runner_fmt.as_list(),
),
check_rc=False,
**kwargs,