32 lines
896 B
Python
32 lines
896 B
Python
from __future__ import (absolute_import, division, print_function)
|
|
__metaclass__ = type
|
|
|
|
|
|
from ansible.plugins.callback import CallbackBase
|
|
from ansible import constants as C
|
|
from ansible.utils.color import colorize, hostcolor
|
|
from ansible.utils.display import Display
|
|
|
|
|
|
class CallbackModule(CallbackBase):
|
|
CALLBACK_VERSION = 2.0
|
|
CALLBACK_TYPE = 'notification'
|
|
CALLBACK_NAME = 'job_status'
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super(CallbackModule, self).__init__()
|
|
|
|
|
|
def v2_playbook_on_start(self, playbook):
|
|
self._display.display("Custom commands for <v2_playbook_on_start> go here", color=C.COLOR_OK)
|
|
|
|
|
|
def v2_playbook_on_task_start(self, task, is_conditional):
|
|
self._display.display("Custom commands for <v2_playbook_on_task_start> go here", color=C.COLOR_OK)
|
|
|
|
|
|
def v2_on_any(self, *args, **kwargs):
|
|
self._display.display("sup, y0?!", color=C.COLOR_OK)
|
|
|
|
|