Permalink
Browse files

fixes for tests

  • Loading branch information...
1 parent 5f4bf81 commit 2ac4acbf9760a1bdc80a2ad7c15e4b9128168ce6 @Ernest0x Ernest0x committed Aug 1, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/ansible/callbacks.py
  2. +1 −1 lib/ansible/runner/__init__.py
  3. +2 −2 test/TestPlayBook.py
@@ -147,7 +147,7 @@ class DefaultRunnerCallbacks(object):
def __init__(self):
pass
- def on_failed(self, host, res):
+ def on_failed(self, host, res, ignore_errors=False):
pass
def on_ok(self, host, res):
@@ -185,7 +185,7 @@ def __init__(self):
self.options = None
self._async_notified = {}
- def on_failed(self, host, res):
+ def on_failed(self, host, res, ignore_errors=False):
self._on_any(host,res)
@@ -259,7 +259,7 @@ def on_unreachable(self, host, msg):
else:
print "fatal: [%s] => %s" % (host, msg)
- def on_failed(self, host, results, ignore_errors):
+ def on_failed(self, host, results, ignore_errors=False):
item = results.get('item', None)
@@ -602,7 +602,7 @@ def _executor_internal_inner(self, host, inject, port, is_chained=False):
if 'skipped' in data:
self.callbacks.on_skipped(result.host)
elif not result.is_successful():
- ignore_errors = self.module_vars['ignore_errors']
+ ignore_errors = self.module_vars.get('ignore_errors', False)
self.callbacks.on_failed(result.host, data, ignore_errors)
if ignore_errors:
if 'failed' in result.result:
@@ -54,8 +54,8 @@ def on_task_start(self, name, is_conditional):
def on_unreachable(self, host, msg):
EVENTS.append([ 'unreachable', [ host, msg ]])
- def on_failed(self, host, results):
- EVENTS.append([ 'failed', [ host, results ]])
+ def on_failed(self, host, results, ignore_errors):
+ EVENTS.append([ 'failed', [ host, results, ignore_errors ]])
def on_ok(self, host, result):
# delete certain info from host_result to make test comparisons easier

0 comments on commit 2ac4acb

Please sign in to comment.