Remove runner_on_error callback that is never used.

pull/8012/head
Chris Church 11 years ago
parent 4e98e3785a
commit 955dadf743

@ -41,9 +41,6 @@ class CallbackModule(object):
def runner_on_ok(self, host, res):
pass
def runner_on_error(self, host, msg):
pass
def runner_on_skipped(self, host, item=None):
pass

@ -343,9 +343,6 @@ class DefaultRunnerCallbacks(object):
def on_ok(self, host, res):
call_callback_module('runner_on_ok', host, res)
def on_error(self, host, msg):
call_callback_module('runner_on_error', host, msg)
def on_skipped(self, host, item=None):
call_callback_module('runner_on_skipped', host, item=item)
@ -404,10 +401,6 @@ class CliRunnerCallbacks(DefaultRunnerCallbacks):
display("%s | skipped" % (host), runner=self.runner)
super(CliRunnerCallbacks, self).on_skipped(host, item)
def on_error(self, host, err):
display("err: [%s] => %s\n" % (host, err), stderr=True, runner=self.runner)
super(CliRunnerCallbacks, self).on_error(host, err)
def on_no_hosts(self):
display("no hosts matched\n", stderr=True, runner=self.runner)
super(CliRunnerCallbacks, self).on_no_hosts()
@ -534,18 +527,6 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
display(msg, color='yellow', runner=self.runner)
super(PlaybookRunnerCallbacks, self).on_ok(host, host_result)
def on_error(self, host, err):
item = err.get('item', None)
msg = ''
if item:
msg = "err: [%s] => (item=%s) => %s" % (host, item, err)
else:
msg = "err: [%s] => %s" % (host, err)
display(msg, color='red', stderr=True, runner=self.runner)
super(PlaybookRunnerCallbacks, self).on_error(host, err)
def on_skipped(self, host, item=None):
if constants.DISPLAY_SKIPPED_HOSTS:
msg = ''

@ -91,9 +91,6 @@ class CallbackModule(object):
def runner_on_ok(self, host, res):
pass
def runner_on_error(self, host, msg):
pass
def runner_on_skipped(self, host, item=None):
pass

@ -63,9 +63,6 @@ class CallbackModule(object):
def runner_on_ok(self, host, res):
log(host, 'OK', res)
def runner_on_error(self, host, msg):
log(host, 'ERROR', msg)
def runner_on_skipped(self, host, item=None):
log(host, 'SKIPPED', '...')

@ -66,12 +66,6 @@ class CallbackModule(object):
body += 'A complete dump of the error:\n\n' + str(res)
mail(sender=sender, subject=subject, body=body)
def runner_on_error(self, host, msg):
sender = '"Ansible: %s" <root>' % host
subject = 'Error: %s' % msg.strip('\r\n').split('\n')[0]
body = 'An error occured for host ' + host + ' with the following message:\n\n' + msg
mail(sender=sender, subject=subject, body=body)
def runner_on_unreachable(self, host, res):
sender = '"Ansible: %s" <root>' % host
if isinstance(res, basestring):

@ -49,9 +49,6 @@ class CallbackModule(object):
def runner_on_ok(self, host, res):
say("pew", LASER_VOICE)
def runner_on_error(self, host, msg):
pass
def runner_on_skipped(self, host, item=None):
say("pew", LASER_VOICE)

Loading…
Cancel
Save