Make sure role deps inherit conditionals/tags specified via params

Fixes #7353
This commit is contained in:
James Cammarata 2015-07-29 14:49:08 -04:00
parent bedfe00de8
commit 782c2f75df

View file

@ -119,6 +119,16 @@ class Role(Base, Become, Conditional, Taggable):
if role_include.role not in play.ROLE_CACHE:
play.ROLE_CACHE[role_include.role] = dict()
if parent_role:
if parent_role.when:
new_when = parent_role.when[:]
new_when.extend(r.when or [])
r.when = new_when
if parent_role.tags:
new_tags = parent_role.tags[:]
new_tags.extend(r.tags or [])
r.tags = new_tags
play.ROLE_CACHE[role_include.role][hashed_params] = r
return r