summaryrefslogtreecommitdiffstats
path: root/callback_plugins
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2014-05-08 21:21:35 +0000
committerRalph Bean <rbean@redhat.com>2014-05-08 21:21:35 +0000
commit09b268e69cc352724967b13de856a54ac52bcfe6 (patch)
treeea100cf5fccfa1dc6dc6f054844563ccac8ad0a2 /callback_plugins
parent2d3bd45979449933d85568bbde155c4a32285841 (diff)
downloadansible-09b268e69cc352724967b13de856a54ac52bcfe6.tar.gz
ansible-09b268e69cc352724967b13de856a54ac52bcfe6.tar.xz
ansible-09b268e69cc352724967b13de856a54ac52bcfe6.zip
Debug fedmsg callback_plugin.
Diffstat (limited to 'callback_plugins')
-rw-r--r--callback_plugins/fedmsg_callback.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/callback_plugins/fedmsg_callback.py b/callback_plugins/fedmsg_callback.py
index b7d402540..628542a92 100644
--- a/callback_plugins/fedmsg_callback.py
+++ b/callback_plugins/fedmsg_callback.py
@@ -34,7 +34,7 @@ def getlogin():
class CallbackModule(object):
""" Publish playbook starts and stops to fedmsg. """
- playbook = None
+ playbook_path = None
def __init__(self):
config = fedmsg.config.load_config()
@@ -57,7 +57,7 @@ class CallbackModule(object):
if play.playbook.check:
return
- if not self.playbook:
+ if not self.playbook_path:
fedmsg.publish(
modname="ansible", topic="playbook.start",
msg=dict(
@@ -69,17 +69,19 @@ class CallbackModule(object):
check=play.playbook.check,
),
)
- self.playbook = path
+ self.playbook_path = path
def playbook_on_stats(self, stats):
- if not self.playbook:
+ if not self.playbook_path:
return
results = dict([(h, stats.summarize(h)) for h in stats.processed])
+ import pprint
+ pprint.pprint(results)
fedmsg.publish(
modname="ansible", topic="playbook.complete",
msg=dict(
- playbook=self.playbook,
+ playbook=self.playbook_path,
userid=getlogin(),
results=results,
),