Make sure role deps inherit conditionals/tags specified via params
Fixes #7353
This commit is contained in:
parent
bedfe00de8
commit
782c2f75df
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue