mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-28 03:49:09 -07:00
Some attributes of callbacks aren't in v2. Port plugins to the v2 way to do that
Update porting guide with info on callback porting
This commit is contained in:
parent
fb57818ea3
commit
9e3932ffca
3 changed files with 47 additions and 2 deletions
|
@ -73,6 +73,7 @@ class CallbackModule(CallbackBase):
|
|||
|
||||
self.printed_playbook = False
|
||||
self.playbook_name = None
|
||||
self.play = None
|
||||
|
||||
def send_msg(self, msg, msg_format='text', color='yellow', notify=False):
|
||||
"""Method for sending a message to HipChat"""
|
||||
|
@ -93,9 +94,11 @@ class CallbackModule(CallbackBase):
|
|||
self.display.warning('Could not submit message to hipchat')
|
||||
|
||||
|
||||
def playbook_on_play_start(self, name):
|
||||
def v2_playbook_on_play_start(self, play):
|
||||
"""Display Playbook and play start messages"""
|
||||
|
||||
self.play = play
|
||||
name = play.name
|
||||
# This block sends information about a playbook when it starts
|
||||
# The playbook object is not immediately available at
|
||||
# playbook_on_start so we grab it via the play
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue