mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix test of whether a result has a failed host
This commit is contained in:
parent
1c49e3b842
commit
fa9ea32a86
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ __metaclass__ = type
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from ansible.errors import AnsibleError
|
||||||
from ansible.template import Templar
|
from ansible.template import Templar
|
||||||
|
|
||||||
class IncludedFile:
|
class IncludedFile:
|
||||||
|
@ -46,7 +47,7 @@ class IncludedFile:
|
||||||
included_files = []
|
included_files = []
|
||||||
|
|
||||||
for res in results:
|
for res in results:
|
||||||
if res._host in tqm._failed_hosts:
|
if res._host.name in tqm._failed_hosts:
|
||||||
raise AnsibleError("host is failed, not including files")
|
raise AnsibleError("host is failed, not including files")
|
||||||
|
|
||||||
if res._task.action == 'include':
|
if res._task.action == 'include':
|
||||||
|
|
Loading…
Reference in a new issue