Merge pull request #759 from moreati/callback_me_maybe

tests: Fix AttributeError in callback plugins used by test suite
pull/715/head v0.2.10-rc.0
Steven Robertson 4 years ago committed by GitHub
commit 27ad214a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,6 +23,9 @@ To avail of fixes in an unreleased version, please download a ZIP file
* :gh:issue:`756` ssh connections with `check_host_keys='accept'` would * :gh:issue:`756` ssh connections with `check_host_keys='accept'` would
timeout, when using recent OpenSSH client versions. timeout, when using recent OpenSSH client versions.
* :gh:issue:`758` fix initilialisation of callback plugins in test suite, to
to address a `KeyError` in
:method:`ansible.plugins.callback.CallbackBase.v2_runner_on_start`
v0.2.9 (2019-11-02) v0.2.9 (2019-11-02)

@ -20,6 +20,8 @@ DefaultModule = callback_loader.get('default', class_only=True)
DOCUMENTATION = ''' DOCUMENTATION = '''
callback: nice_stdout callback: nice_stdout
type: stdout type: stdout
extends_documentation_fragment:
- default_callback
options: options:
check_mode_markers: check_mode_markers:
name: Show markers when running in check mode name: Show markers when running in check mode
@ -74,6 +76,10 @@ def printi(tio, obj, key=None, indent=0):
class CallbackModule(DefaultModule): class CallbackModule(DefaultModule):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'stdout'
CALLBACK_NAME = 'nice_stdout'
def _dump_results(self, result, *args, **kwargs): def _dump_results(self, result, *args, **kwargs):
try: try:
tio = io.StringIO() tio = io.StringIO()

@ -37,6 +37,7 @@ class CallbackModule(CallbackBase):
A plugin for timing tasks A plugin for timing tasks
""" """
def __init__(self): def __init__(self):
super(CallbackModule, self).__init__()
self.stats = {} self.stats = {}
self.current = None self.current = None

Loading…
Cancel
Save