Skip evaluating only_if for BYPASS_HOST_LOOP plugins

parent bda08c8a
...@@ -349,7 +349,7 @@ class Runner(object): ...@@ -349,7 +349,7 @@ class Runner(object):
handler = utils.plugins.action_loader.get('async', self) handler = utils.plugins.action_loader.get('async', self)
conditional = utils.template(self.basedir, self.conditional, inject) conditional = utils.template(self.basedir, self.conditional, inject)
if not utils.check_conditional(conditional): if not getattr(handler, 'BYPASS_HOST_LOOP', False) and not utils.check_conditional(conditional):
result = utils.jsonify(dict(skipped=True)) result = utils.jsonify(dict(skipped=True))
self.callbacks.on_skipped(host, inject.get('item',None)) self.callbacks.on_skipped(host, inject.get('item',None))
return ReturnData(host=host, result=result) return ReturnData(host=host, result=result)
......
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