mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fixing bugs related to nested blocks inside roles
* Make sure dep chains are checked recursively for nested blocks * Fixing iterator is_failed() check to make sure we're not in a rescue block before returning True * Use is_failed() to test whether a host should be added to the TQM failed_hosts list * Use is_failed() when compiling the list of hosts left to iterate over in both the linear and free strategies Fixes #14222
This commit is contained in:
parent
00f600bfc8
commit
275728e0f6
6 changed files with 46 additions and 28 deletions
|
@ -262,10 +262,11 @@ class Role(Base, Become, Conditional, Taggable):
|
|||
def get_inherited_vars(self, dep_chain=[], include_params=True):
|
||||
inherited_vars = dict()
|
||||
|
||||
for parent in dep_chain:
|
||||
inherited_vars = combine_vars(inherited_vars, parent._role_vars)
|
||||
if include_params:
|
||||
inherited_vars = combine_vars(inherited_vars, parent._role_params)
|
||||
if dep_chain:
|
||||
for parent in dep_chain:
|
||||
inherited_vars = combine_vars(inherited_vars, parent._role_vars)
|
||||
if include_params:
|
||||
inherited_vars = combine_vars(inherited_vars, parent._role_params)
|
||||
return inherited_vars
|
||||
|
||||
def get_role_params(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue