mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 23:00:02 -07:00
Merge pull request #8012 from cchurch/callback_cleanup
Callback plugin cleanup
This commit is contained in:
commit
51e014d915
7 changed files with 12 additions and 48 deletions
|
@ -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
|
||||
|
||||
|
@ -141,7 +138,7 @@ class CallbackModule(object):
|
|||
def playbook_on_not_import_for_host(self, host, missing_file):
|
||||
pass
|
||||
|
||||
def playbook_on_play_start(self, pattern):
|
||||
def playbook_on_play_start(self, name):
|
||||
"""Display Playbook and play start messages"""
|
||||
|
||||
# This block sends information about a playbook when it starts
|
||||
|
@ -170,7 +167,7 @@ class CallbackModule(object):
|
|||
|
||||
# This is where we actually say we are starting a play
|
||||
self.send_msg("%s: Starting play: %s" %
|
||||
(self.playbook_name, pattern))
|
||||
(self.playbook_name, name))
|
||||
|
||||
def playbook_on_stats(self, stats):
|
||||
"""Display info about playbook statistics"""
|
||||
|
|
|
@ -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', '...')
|
||||
|
||||
|
@ -111,7 +108,7 @@ class CallbackModule(object):
|
|||
def playbook_on_not_import_for_host(self, host, missing_file):
|
||||
log(host, 'NOTIMPORTED', missing_file)
|
||||
|
||||
def playbook_on_play_start(self, pattern):
|
||||
def playbook_on_play_start(self, name):
|
||||
pass
|
||||
|
||||
def playbook_on_stats(self, stats):
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
@ -100,8 +97,8 @@ class CallbackModule(object):
|
|||
def playbook_on_not_import_for_host(self, host, missing_file):
|
||||
pass
|
||||
|
||||
def playbook_on_play_start(self, pattern):
|
||||
say("Starting play: %s" % pattern, HAPPY_VOICE)
|
||||
def playbook_on_play_start(self, name):
|
||||
say("Starting play: %s" % name, HAPPY_VOICE)
|
||||
|
||||
def playbook_on_stats(self, stats):
|
||||
say("Play complete", HAPPY_VOICE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue