1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix to group_by module as a result of previous conditional upgrades.

This commit is contained in:
Michael DeHaan 2013-07-22 10:11:19 -04:00
parent e3f213e030
commit 2fe25f19dc

View file

@ -58,8 +58,12 @@ class ActionModule(object):
data = {}
data.update(inject)
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):
continue
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
group_name = template.template(self.runner.basedir, args['key'], data)
group_name = group_name.replace(' ','-')
if group_name not in groups: