diff options
author | giovannisciortino <30353557+giovannisciortino@users.noreply.github.com> | 2017-08-08 15:48:39 +0200 |
---|---|---|
committer | Brian Coca <bcoca@users.noreply.github.com> | 2017-08-08 09:48:39 -0400 |
commit | 1fb1793c705b5b74738d69e84170c2ec4ad6295f (patch) | |
tree | 94f600516f2a2a5351a80402d87a7b30445d3c52 | |
parent | e244deedbdaac67a591b72797c9b5bf6e3c45645 (diff) | |
download | ansible-1fb1793c705b5b74738d69e84170c2ec4ad6295f.tar.gz |
helpers.py: Fixes #27334 include empty task file within a 'block' dis… (#27811)
* helpers.py: Fixes #27334 include empty task file within a 'block' disables the complete block
* include module: added warning if file without tasks is included
-rw-r--r-- | lib/ansible/playbook/helpers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/playbook/helpers.py b/lib/ansible/playbook/helpers.py index e3e502341b..44f12eecef 100644 --- a/lib/ansible/playbook/helpers.py +++ b/lib/ansible/playbook/helpers.py @@ -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) |