diff --git a/awx_collection/plugins/module_utils/tower_api.py b/awx_collection/plugins/module_utils/tower_api.py index b609f76e67..643fbd05fc 100644 --- a/awx_collection/plugins/module_utils/tower_api.py +++ b/awx_collection/plugins/module_utils/tower_api.py @@ -366,7 +366,7 @@ class TowerAPIModule(TowerModule): if auto_exit: self.exit_json(**self.json_output) else: - return self.json_output ######### + return self.json_output else: if 'json' in response and '__all__' in response['json']: self.fail_json(msg="Unable to delete {0} {1}: {2}".format(item_type, item_name, response['json']['__all__'][0])) diff --git a/awx_collection/plugins/modules/tower_workflow_job_template_node.py b/awx_collection/plugins/modules/tower_workflow_job_template_node.py index 71e312c625..1718af91e8 100644 --- a/awx_collection/plugins/modules/tower_workflow_job_template_node.py +++ b/awx_collection/plugins/modules/tower_workflow_job_template_node.py @@ -325,8 +325,8 @@ def main(): endpoint=approval_endpoint, item_type='workflow_job_template_approval_node', associations=association_fields ) - - module.exit_json(**module.json_output) + + if __name__ == '__main__': main()