Try to silence fedmsg for --check runs.

This commit is contained in:
Ralph Bean 2014-01-22 20:47:56 +00:00
parent ffcff93ce8
commit 474fef8661

View file

@ -53,6 +53,10 @@ class CallbackModule(object):
# figure out where the playbook FILE is
path = os.path.abspath(play.playbook.filename)
# Bail out early without publishing if we're in --check mode
if play.playbook.check:
return
if not self.playbook:
fedmsg.publish(
modname="ansible", topic="playbook.start",
@ -68,6 +72,9 @@ class CallbackModule(object):
self.playbook = path
def playbook_on_stats(self, stats):
if not self.playbook:
return
results = dict([(h, stats.summarize(h)) for h in stats.processed])
fedmsg.publish(
modname="ansible", topic="playbook.complete",