mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Fix to group_by module as a result of previous conditional upgrades.
This commit is contained in:
parent
e3f213e030
commit
2fe25f19dc
1 changed files with 6 additions and 2 deletions
|
@ -58,7 +58,11 @@ class ActionModule(object):
|
||||||
data = {}
|
data = {}
|
||||||
data.update(inject)
|
data.update(inject)
|
||||||
data.update(inject['hostvars'][host])
|
data.update(inject['hostvars'][host])
|
||||||
if not check_conditional(self.runner.basedir, self.runner.conditional, data, fail_on_undefined=self.runner.error_on_undefined_vars):
|
conds = self.runner.conditional
|
||||||
|
if type(conds) != list:
|
||||||
|
conds = [ conds ]
|
||||||
|
for cond in conds:
|
||||||
|
if not check_conditional(cond, self.runner.basedir, data, fail_on_undefined=self.runner.error_on_undefined_vars):
|
||||||
continue
|
continue
|
||||||
group_name = template.template(self.runner.basedir, args['key'], data)
|
group_name = template.template(self.runner.basedir, args['key'], data)
|
||||||
group_name = group_name.replace(' ','-')
|
group_name = group_name.replace(' ','-')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue