Commit e7957b6d by Stoned Elipot Committed by Michael DeHaan

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

parent 44e391fd
......@@ -61,8 +61,12 @@ 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):
next_host = True
break
if next_host:
continue
group_name = template.template(self.runner.basedir, args['key'], data)
group_name = group_name.replace(' ','-')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment