You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# site.yml
---
- hosts: all
tasks:
- include: test.yml
# test.yml
---
hosts: all
please note the missing "-" before hosts
cmd from dir where the files are located:
ansible-playbook site.yml
EXPECTED RESULTS
error handling
ACTUAL RESULTS
ansible-playbook site.yml -vvvv
Using /home/user/a-bug-project/ansible.cfg as config file
[WARNING]: provided hosts list is empty, only localhost is available
ERROR! Unexpected Exception: global name 'AnsibleError' is not defined
the full traceback was:
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 92, in <module>
exit_code = cli.run()
File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 154, in run
results = pbex.run()
File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 73, in run
pb = Playbook.load(playbook_path, variable_manager=self._variable_manager, loader=self._loader)
File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 53, in load
pb._load_playbook_data(file_name=file_name, variable_manager=variable_manager)
File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 98, in _load_playbook_data
entry_obj = Play.load(entry, variable_manager=variable_manager, loader=self._loader)
File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 115, in load
return p.load_data(data, variable_manager=variable_manager, loader=loader)
File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 219, in load_data
self._attributes[name] = method(name, ds[name])
File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 145, in _load_tasks
return load_list_of_blocks(ds=ds, play=self, variable_manager=self._variable_manager, loader=self._loader)
File "/usr/lib/python2.7/site-packages/ansible/playbook/helpers.py", line 58, in load_list_of_blocks
loader=loader
File "/usr/lib/python2.7/site-packages/ansible/playbook/block.py", line 79, in load
return b.load_data(data, variable_manager=variable_manager, loader=loader)
File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 219, in load_data
self._attributes[name] = method(name, ds[name])
File "/usr/lib/python2.7/site-packages/ansible/playbook/block.py", line 115, in _load_block
use_handlers=self._use_handlers,
File "/usr/lib/python2.7/site-packages/ansible/playbook/helpers.py", line 181, in load_list_of_tasks
raise AnsibleError("included task files must contain a list of tasks", obj=data)
NameError: global name 'AnsibleError' is not defined
The text was updated successfully, but these errors were encountered:
ISSUE TYPE
COMPONENT NAME
ansible
ANSIBLE VERSION
CONFIGURATION
empty config file
OS / ENVIRONMENT
F25
SUMMARY
typo in playbook resulted in unhandled exception
STEPS TO REPRODUCE
EXPECTED RESULTS
error handling
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: