mirror of https://github.com/ansible/ansible.git
adhoc: Load callbacks before sending v2_playbook_on_start (#67673)
parent
4c016e64dd
commit
370f788731
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- ansible command now correctly sends v2_playbook_on_start to callbacks
|
@ -0,0 +1,12 @@
|
||||
v2_playbook_on_start
|
||||
v2_on_any
|
||||
v2_playbook_on_play_start
|
||||
v2_on_any
|
||||
v2_playbook_on_task_start
|
||||
v2_on_any
|
||||
v2_runner_on_start
|
||||
v2_on_any
|
||||
v2_runner_on_ok
|
||||
v2_on_any
|
||||
v2_playbook_on_stats
|
||||
v2_on_any
|
@ -0,0 +1,24 @@
|
||||
# (c) 2020 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
||||
class CallbackModule(CallbackBase):
|
||||
CALLBACK_VERSION = 2.0
|
||||
CALLBACK_TYPE = 'stdout'
|
||||
CALLBACK_NAME = 'callback_debug'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CallbackModule, self).__init__(*args, **kwargs)
|
||||
self._display.display('__init__')
|
||||
|
||||
for cb in [x for x in dir(CallbackBase) if x.startswith('v2_')]:
|
||||
delattr(CallbackBase, cb)
|
||||
|
||||
def __getattr__(self, name):
|
||||
if name.startswith('v2_'):
|
||||
return(lambda *args, **kwargs: self._display.display(name))
|
Loading…
Reference in New Issue