Correct callback plugins for Ansible 2.10+

This change adds a DOCUMENTATION constant and a get_options method
to the tripleo_dense callback plugin which resolves deprecation
warnings and errors caused by the updated ansible specification.

Change-Id: I7a1872c6fa8fc778e742e9ad417e9bf2560a342a
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2021-03-08 11:26:02 -06:00
parent db36cf0b8f
commit 1bfeabd488
No known key found for this signature in database
GPG Key ID: CE94BD890A47B20A
1 changed files with 16 additions and 0 deletions

View File

@ -8,7 +8,23 @@ from ansible.plugins.callback.default import CallbackModule as DefaultCallback
from datetime import datetime
DOCUMENTATION = """
name: tripleo_dense
type: stdout
short_description: default TripleO screen output
version_added: historical
description:
- This is the default output callback for TripleO.
extends_documentation_fragment:
- default_callback
requirements:
- set as stdout in configuration
"""
class CallbackModule(DefaultCallback):
def get_options(self, option_string):
pass
def _output(self, msg, color=None):
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")