summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-01-06 12:26:53 +0100
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-01-12 14:23:19 +0100
commit80e824c00c73f15a5958680d73d68b505da4d327 (patch)
tree27269b1310d8a445293d448f47d106b96c47c67e
parent82ef5bc291006b51207b9e32626251a03c776548 (diff)
downloadopenshift-80e824c00c73f15a5958680d73d68b505da4d327.tar.gz
openshift-80e824c00c73f15a5958680d73d68b505da4d327.tar.bz2
openshift-80e824c00c73f15a5958680d73d68b505da4d327.tar.xz
openshift-80e824c00c73f15a5958680d73d68b505da4d327.zip
Make callback plugin an always-on aggregate plugin
This makes it so that one doesn't need to explicitly enable nor replace the default callback plugin.
-rw-r--r--ansible.cfg.example1
-rw-r--r--callback_plugins/failure_summary.py (renamed from callback_plugins/default_plus_summary.py)12
2 files changed, 6 insertions, 7 deletions
diff --git a/ansible.cfg.example b/ansible.cfg.example
index c8cc5db03..b07705ef1 100644
--- a/ansible.cfg.example
+++ b/ansible.cfg.example
@@ -15,7 +15,6 @@ log_path = /tmp/ansible.log
# prints a descriptive summary of failed tasks
callback_plugins = ./callback_plugins
-stdout_callback = default_plus_summary
# Uncomment to use the provided BYO inventory
#hostfile = inventory/byo/hosts
diff --git a/callback_plugins/default_plus_summary.py b/callback_plugins/failure_summary.py
index 610a3e98a..bcb0123b0 100644
--- a/callback_plugins/default_plus_summary.py
+++ b/callback_plugins/failure_summary.py
@@ -3,20 +3,20 @@
Ansible callback plugin.
'''
-from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
+from ansible.plugins.callback import CallbackBase
from ansible import constants as C
from ansible.utils.color import stringc
-class CallbackModule(CallbackModule_default):
+class CallbackModule(CallbackBase):
'''
- This is like the default callback plugin, but also stores results and
- summarizes failures.
+ This callback plugin stores task results and summarizes failures.
'''
CALLBACK_VERSION = 2.0
- CALLBACK_TYPE = 'stdout'
- CALLBACK_NAME = 'default_plus_summary'
+ CALLBACK_TYPE = 'aggregate'
+ CALLBACK_NAME = 'failure_summary'
+ CALLBACK_NEEDS_WHITELIST = False
def __init__(self):
super(CallbackModule, self).__init__()