mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Moving client variable out in bigiq modules (#48542)
This is being done to ensure that errors are not encountered if the exception case is hit
This commit is contained in:
parent
452cf2b1a3
commit
22c9da538e
11 changed files with 21 additions and 10 deletions
|
@ -726,8 +726,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -672,8 +672,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -672,8 +672,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -725,8 +725,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -968,8 +968,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -993,8 +993,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -2299,8 +2299,9 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode
|
supports_check_mode=spec.supports_check_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
cleanup_tokens(client)
|
cleanup_tokens(client)
|
||||||
|
|
|
@ -471,6 +471,7 @@ def main():
|
||||||
supports_check_mode=spec.supports_check_mode,
|
supports_check_mode=spec.supports_check_mode,
|
||||||
required_if=spec.required_if,
|
required_if=spec.required_if,
|
||||||
)
|
)
|
||||||
|
|
||||||
client = F5RestClient(**module.params)
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -617,8 +617,9 @@ def main():
|
||||||
required_if=spec.required_if
|
required_if=spec.required_if
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -448,8 +448,9 @@ def main():
|
||||||
required_if=spec.required_if
|
required_if=spec.required_if
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
|
@ -629,8 +629,9 @@ def main():
|
||||||
required_if=spec.required_if
|
required_if=spec.required_if
|
||||||
)
|
)
|
||||||
|
|
||||||
|
client = F5RestClient(**module.params)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client = F5RestClient(**module.params)
|
|
||||||
mm = ModuleManager(module=module, client=client)
|
mm = ModuleManager(module=module, client=client)
|
||||||
results = mm.exec_module()
|
results = mm.exec_module()
|
||||||
exit_json(module, results, client)
|
exit_json(module, results, client)
|
||||||
|
|
Loading…
Reference in a new issue