Commit 58477207 by James Cammarata

Fixing a small bug with the new role dependency feature

The block that added the original list of roles was indented too far,
and was only being reached if a role had dependencies. This resulted
in roles without dependencies from being added to the list of roles.

Credit goes to looped for reporting and diagnosing the issue.
parent 5452f006
...@@ -177,10 +177,10 @@ class Play(object): ...@@ -177,10 +177,10 @@ class Play(object):
del dep_vars['role'] del dep_vars['role']
self._build_role_dependencies([dep], dep_stack, passed_vars=dep_vars, level=level+1) self._build_role_dependencies([dep], dep_stack, passed_vars=dep_vars, level=level+1)
dep_stack.append([dep,dep_path,dep_vars]) dep_stack.append([dep,dep_path,dep_vars])
# only add the current role when we're at the top level, # only add the current role when we're at the top level,
# otherwise we'll end up in a recursive loop # otherwise we'll end up in a recursive loop
if level == 0: if level == 0:
dep_stack.append([role,role_path,role_vars]) dep_stack.append([role,role_path,role_vars])
return dep_stack return dep_stack
def _load_roles(self, roles, ds): def _load_roles(self, roles, ds):
......
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