From 4c0eff02e52b80701a59a2677ff857b20ddf1e25 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Tue, 30 May 2023 04:54:35 +1200 Subject: [PATCH] sorcery: moved import to top (#6525) * sorcery: moved import to top * add changelog frag * Update changelogs/fragments/6525-sorcery-import.yaml Co-authored-by: Vlad Glagolev --------- Co-authored-by: Vlad Glagolev --- changelogs/fragments/6525-sorcery-import.yaml | 2 ++ plugins/modules/sorcery.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/6525-sorcery-import.yaml diff --git a/changelogs/fragments/6525-sorcery-import.yaml b/changelogs/fragments/6525-sorcery-import.yaml new file mode 100644 index 0000000000..efc170cd74 --- /dev/null +++ b/changelogs/fragments/6525-sorcery-import.yaml @@ -0,0 +1,2 @@ +minor_changes: + - sorcery - minor refactor (https://github.com/ansible-collections/community.general/pull/6525). diff --git a/plugins/modules/sorcery.py b/plugins/modules/sorcery.py index 3278ce0abd..538d91de11 100644 --- a/plugins/modules/sorcery.py +++ b/plugins/modules/sorcery.py @@ -165,6 +165,8 @@ import re import shutil import sys +from ansible.module_utils.basic import AnsibleModule + # auto-filled at module init SORCERY = { @@ -646,8 +648,5 @@ def main(): manage_spells(module) -# import module snippets -from ansible.module_utils.basic import AnsibleModule - if __name__ == '__main__': main()