Allow empty include files again

Fixes #11582
This commit is contained in:
James Cammarata 2015-07-14 08:25:48 -04:00
parent 44aef347cb
commit 7dd5600839

View file

@ -369,6 +369,8 @@ class StrategyBase:
try: try:
data = self._loader.load_from_file(included_file._filename) data = self._loader.load_from_file(included_file._filename)
if data is None:
return []
except AnsibleError, e: except AnsibleError, e:
for host in included_file._hosts: for host in included_file._hosts:
tr = TaskResult(host=host, task=included_file._task, return_data=dict(failed=True, reason=str(e))) tr = TaskResult(host=host, task=included_file._task, return_data=dict(failed=True, reason=str(e)))