diff options
author | Ralph Bean <rbean@redhat.com> | 2014-01-22 20:47:56 +0000 |
---|---|---|
committer | Ralph Bean <rbean@redhat.com> | 2014-01-22 20:48:05 +0000 |
commit | 474fef86618ccf71a6d6d482cd440695f1975ec5 (patch) | |
tree | cf232ef302fcd4248edae20671b7b53208df8404 /callback_plugins/fedmsg_callback.py | |
parent | ffcff93ce8453c20e264073c40c9c7592cb52738 (diff) | |
download | ansible-474fef86618ccf71a6d6d482cd440695f1975ec5.tar.gz ansible-474fef86618ccf71a6d6d482cd440695f1975ec5.tar.xz ansible-474fef86618ccf71a6d6d482cd440695f1975ec5.zip |
Try to silence fedmsg for --check runs.
Diffstat (limited to 'callback_plugins/fedmsg_callback.py')
-rw-r--r-- | callback_plugins/fedmsg_callback.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/callback_plugins/fedmsg_callback.py b/callback_plugins/fedmsg_callback.py index 3a892fe76..b7d402540 100644 --- a/callback_plugins/fedmsg_callback.py +++ b/callback_plugins/fedmsg_callback.py @@ -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", |