mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
Fix using loops with environment and add tests (#32796)
This commit is contained in:
parent
aa74434815
commit
7bb35e8781
2 changed files with 93 additions and 4 deletions
|
@ -180,10 +180,9 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
if not isinstance(environments, list):
|
||||
environments = [environments]
|
||||
|
||||
# the environments as inherited need to be reversed, to make
|
||||
# sure we merge in the parent's values first so those in the
|
||||
# block then task 'win' in precedence
|
||||
environments.reverse()
|
||||
# The order of environments matters to make sure we merge
|
||||
# in the parent's values first so those in the block then
|
||||
# task 'win' in precedence
|
||||
for environment in environments:
|
||||
if environment is None or len(environment) == 0:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue