From c57754a29bc0fea65ceb8293e2b897c2ad1b3153 Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Fri, 17 Jan 2020 15:44:25 -0500 Subject: [PATCH] Logout is now handled by exit_json --- awx_collection/plugins/modules/tower_license.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx_collection/plugins/modules/tower_license.py b/awx_collection/plugins/modules/tower_license.py index b1419e7375..a8ef96cbda 100644 --- a/awx_collection/plugins/modules/tower_license.py +++ b/awx_collection/plugins/modules/tower_license.py @@ -60,9 +60,11 @@ def main(): if json_output['old_license'] != new_license: json_output['changed'] = True + + # Deal with check mode if module.check_mode: - module.logout() module.exit_json(**json_output) + # We need to add in the EULA new_license['eula_accepted'] = True module.post_endpoint('config', data=new_license) @@ -72,3 +74,4 @@ def main(): if __name__ == '__main__': main() +