Reestablishing the use of tags/when for role duplication detection

Not figuring these in can cause problems with "diamond" pattern relationships,
even though this is still not quite optimal.
This commit is contained in:
James Cammarata 2015-07-20 14:36:31 -04:00
commit dca36c1d16
4 changed files with 20 additions and 10 deletions

View file

@ -101,6 +101,10 @@ class Role(Base, Become, Conditional, Taggable):
# We use frozenset to make the dictionary hashable.
params = role_include.get_role_params()
if role_include.when is not None:
params['when'] = role_include.when
if role_include.tags is not None:
params['tags'] = role_include.tags
hashed_params = hash_params(params)
if role_include.role in play.ROLE_CACHE:
for (entry, role_obj) in play.ROLE_CACHE[role_include.role].iteritems():