From 5cf7ce705a1397e7297f724c7fdace7e7026adb0 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:52:22 +0100 Subject: [PATCH] [PR #5773/02431341 backport][stable-6] snap: use MH execute() static method (#5774) snap: use MH execute() static method (#5773) * use MH execute() static method * add changelog fragment (cherry picked from commit 02431341b7ecf24432f4082a6005721c624ae550) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/5773-snap-mh-execute.yml | 2 ++ plugins/modules/snap.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/5773-snap-mh-execute.yml diff --git a/changelogs/fragments/5773-snap-mh-execute.yml b/changelogs/fragments/5773-snap-mh-execute.yml new file mode 100644 index 0000000000..43b9b6a1ac --- /dev/null +++ b/changelogs/fragments/5773-snap-mh-execute.yml @@ -0,0 +1,2 @@ +minor_changes: + - snap - minor refactor when executing module (https://github.com/ansible-collections/community.general/pull/5773). diff --git a/plugins/modules/snap.py b/plugins/modules/snap.py index a432504472..1b5e27071a 100644 --- a/plugins/modules/snap.py +++ b/plugins/modules/snap.py @@ -399,8 +399,7 @@ class Snap(CmdStateModuleHelper): def main(): - snap = Snap() - snap.run() + Snap.execute() if __name__ == '__main__':