diff --git a/awx_collection/plugins/modules/tower_job_wait.py b/awx_collection/plugins/modules/tower_job_wait.py index 0f22e1abba..404db043b2 100644 --- a/awx_collection/plugins/modules/tower_job_wait.py +++ b/awx_collection/plugins/modules/tower_job_wait.py @@ -171,7 +171,7 @@ def main(): # Loop while the job is not yet completed while not result['finished']: # If we are past our time out fail with a message - if timeout and time.time() - start: + if timeout and timeout < time.time() - start: module.json_output['msg'] = "Monitoring aborted due to timeout" module.fail_json(**module.json_output)