Try to silence fedmsg for --check runs.
This commit is contained in:
parent
ffcff93ce8
commit
474fef8661
1 changed files with 7 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue