fixed usage of incorrect exception class

fixes #17895
This commit is contained in:
Brian Coca 2016-10-04 11:47:48 -04:00
parent 2a234c1ff9
commit e72d1e995f

View file

@ -178,7 +178,7 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
if data is None:
return []
elif not isinstance(data, list):
raise AnsibleError("included task files must contain a list of tasks", obj=data)
raise AnsibleParserError("included task files must contain a list of tasks", obj=data)
# since we can't send callbacks here, we display a message directly in
# the same fashion used by the on_include callback. We also do it here,