Fix group_by: do not group a host for which a condition is false

pull/4284/merge
Stoned Elipot 11 years ago committed by Michael DeHaan
parent 44e391fd8b
commit e7957b6d58

@ -61,9 +61,13 @@ class ActionModule(object):
conds = self.runner.conditional
if type(conds) != list:
conds = [ conds ]
next_host = False
for cond in conds:
if not check_conditional(cond, self.runner.basedir, data, fail_on_undefined=self.runner.error_on_undefined_vars):
continue
next_host = True
break
if next_host:
continue
group_name = template.template(self.runner.basedir, args['key'], data)
group_name = group_name.replace(' ','-')
if group_name not in groups:

Loading…
Cancel
Save