mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
move imports from functions to the top of the file (#11396)
* move imports from functions to the top of the file * add changelog frag * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -103,6 +103,7 @@ output:
|
||||
|
||||
import json
|
||||
from http import cookiejar
|
||||
from string import Template
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
@@ -153,8 +154,6 @@ def main():
|
||||
module.params["force_basic_auth"] = True
|
||||
|
||||
if module.params["args"] is not None:
|
||||
from string import Template
|
||||
|
||||
try:
|
||||
script_contents = Template(module.params["script"]).substitute(module.params["args"])
|
||||
except KeyError as err:
|
||||
|
||||
Reference in New Issue
Block a user