summaryrefslogtreecommitdiffstats
path: root/callback_plugins/fedmsg_callback2.py
diff options
context:
space:
mode:
Diffstat (limited to 'callback_plugins/fedmsg_callback2.py')
-rw-r--r--callback_plugins/fedmsg_callback2.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/callback_plugins/fedmsg_callback2.py b/callback_plugins/fedmsg_callback2.py
index 391191385..9cc7126a5 100644
--- a/callback_plugins/fedmsg_callback2.py
+++ b/callback_plugins/fedmsg_callback2.py
@@ -61,18 +61,22 @@ class CallbackModule(CallbackBase):
except ValueError:
pass
self.play = None
+ self.playbook = None
super(CallbackModule, self).__init__()
+ def v2_playbook_on_start(self, playbook):
+ self.playbook = playbook
+
def v2_playbook_on_play_start(self, play):
# This gets called once for each play.. but we just issue a message once
# for the first one. One per "playbook"
- if play:
+ if self.playbook:
# figure out where the playbook FILE is
- path = os.path.abspath(play.playbook.filename)
+ path = os.path.abspath(self.playbook.filename)
# Bail out early without publishing if we're in --check mode
- if play.playbook.check:
+ if self.playbook.check:
return
if not self.playbook_path:
@@ -81,10 +85,10 @@ class CallbackModule(CallbackBase):
msg=dict(
playbook=path,
userid=getlogin(),
- extra_vars=play.playbook.extra_vars,
- inventory=play.playbook.inventory.host_list,
- playbook_checksum=play.playbook.check,
- check=play.playbook.check,
+ extra_vars=self.playbook.extra_vars,
+ inventory=self.playbook.inventory.host_list,
+ playbook_checksum=self.playbook.check,
+ check=self.playbook.check,
),
)
self.playbook_path = path