mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Fix using loops with environment and add tests (#32796)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user