diff options
author | David Shrewsbury <Shrews@users.noreply.github.com> | 2016-08-15 13:29:06 -0400 |
---|---|---|
committer | Brian Coca <bcoca@users.noreply.github.com> | 2016-08-15 13:29:06 -0400 |
commit | bf8c871801fe75557823cdeb8228da9d18ece599 (patch) | |
tree | 104e55f6cba92316879e5efe39a6f18f79f17977 | |
parent | 1f5552f586b58f6876bef9511f4ee329a358a4e7 (diff) | |
download | ansible-bf8c871801fe75557823cdeb8228da9d18ece599.tar.gz |
Fix async logic when parsing fails (#17091)
We want to NOT consider the async task as failed if the result is
not parsed, which was the intent of:
https://github.com/ansible/ansible/pull/16458
However, the logic doesn't actually do that because we default
the 'parsed' value to True. It should default to False so that
we continue waiting, as intended.
-rw-r--r-- | lib/ansible/executor/task_executor.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 3faaee7e82..7d82910b57 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -594,7 +594,7 @@ class TaskExecutor: # have issues which result in a half-written/unparseable result # file on disk, which manifests to the user as a timeout happening # before it's time to timeout. - if int(async_result.get('finished', 0)) == 1 or ('failed' in async_result and async_result.get('parsed', True)) or 'skipped' in async_result: + if int(async_result.get('finished', 0)) == 1 or ('failed' in async_result and async_result.get('parsed', False)) or 'skipped' in async_result: break time_left -= self._task.poll |