diff options
author | Sloane Hertel <19572925+s-hertel@users.noreply.github.com> | 2024-10-30 15:35:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 15:35:23 +0100 |
commit | 03acb22f99e0724f38c01a3dfe62574bc08febca (patch) | |
tree | 9aa6078684fb6e205f4420033000ffabc6964f10 /lib | |
parent | Add a test using ignore_errors as a variable (#84175) (diff) | |
download | ansible-03acb22f99e0724f38c01a3dfe62574bc08febca.tar.xz ansible-03acb22f99e0724f38c01a3dfe62574bc08febca.zip |
Fix returning unreachable for looped tasks (#84049)
* Fix returning unreachable for looped tasks
Add tests for ignore_unreachable and loop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/executor/task_executor.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 7299d1a54b..ff1c33871f 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -150,6 +150,7 @@ class TaskExecutor: if 'unreachable' in item and item['unreachable']: item_ignore_unreachable = item.pop('_ansible_ignore_unreachable') if not res.get('unreachable'): + res['unreachable'] = True self._task.ignore_unreachable = item_ignore_unreachable elif self._task.ignore_unreachable and not item_ignore_unreachable: self._task.ignore_unreachable = item_ignore_unreachable |