Commit fba55880 by James Cammarata

Handle empty role definitions in YAML (v2)

parent f5471186
...@@ -174,6 +174,9 @@ class Play(Base, Taggable, Become): ...@@ -174,6 +174,9 @@ class Play(Base, Taggable, Become):
list of role definitions and creates the Role from those objects list of role definitions and creates the Role from those objects
''' '''
if ds is None:
ds = []
role_includes = load_list_of_roles(ds, variable_manager=self._variable_manager, loader=self._loader) role_includes = load_list_of_roles(ds, variable_manager=self._variable_manager, loader=self._loader)
roles = [] roles = []
......
...@@ -65,6 +65,9 @@ class RoleMetadata(Base): ...@@ -65,6 +65,9 @@ class RoleMetadata(Base):
which returns a list of RoleInclude objects which returns a list of RoleInclude objects
''' '''
if ds is None:
ds = []
current_role_path = None current_role_path = None
if self._owner: if self._owner:
current_role_path = os.path.dirname(self._owner._role_path) current_role_path = os.path.dirname(self._owner._role_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment