Skip to content

Commit

Permalink
helpers.py: Fixes ansible#27334 include empty task file within a 'blo…
Browse files Browse the repository at this point in the history
…ck' dis… (ansible#27811)

* helpers.py: Fixes ansible#27334 include empty task file within a 'block' disables the complete block

* include module: added warning if file without tasks is included
  • Loading branch information
giovannisciortino authored and bcoca committed Aug 8, 2017
1 parent e244dee commit 1fb1793
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/playbook/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
try:
data = loader.load_from_file(include_file)
if data is None:
return []
display.warning('file %s is empty and had no tasks to include' % include_file)
continue
elif not isinstance(data, list):
raise AnsibleParserError("included task files must contain a list of tasks", obj=data)

Expand Down

0 comments on commit 1fb1793

Please sign in to comment.