mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
narrow down exception catching in block builds
this was obscuring other errors and should have always been narrow scope
This commit is contained in:
parent
e56efa49c4
commit
d9e510b192
1 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ class Role(Base, Become, Conditional, Taggable):
|
|||
if task_data:
|
||||
try:
|
||||
self._task_blocks = load_list_of_blocks(task_data, play=self._play, role=self, loader=self._loader)
|
||||
except:
|
||||
except AssertionError:
|
||||
raise AnsibleParserError("The tasks/main.yml file for role '%s' must contain a list of tasks" % self._role_name , obj=task_data)
|
||||
|
||||
handler_data = self._load_role_yaml('handlers')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue