mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Merge pull request #650 from felixfontein/callback
profile_* callbacks: avoid deprecated/deleted functions SUMMARY The profile_roles and profile_tasks callbacks define methods playbook_on_setup and playbook_on_stats which have been deleted/deprecated: playbook_on_stats has been deprecated, v2_playbook_on_stats should be used instead (that one has already been there for many years: ansible/ansible@ba0e532 was added in 2015). playbook_on_setup has been deleted (ansible/ansible@eec57ec), and its v2 variant was already deleted in 2017: ansible/ansible@59d5481 Ref: #635 ISSUE TYPE Bugfix Pull Request Feature Pull Request COMPONENT NAME profile_roles profile_tasks Reviewed-by: Abhijeet Kasurde Reviewed-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
commit
c273ac2a01
3 changed files with 4 additions and 8 deletions
2
changelogs/fragments/650-profile_tasks_roles.yml
Normal file
2
changelogs/fragments/650-profile_tasks_roles.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- "profile_tasks and profile_roles callback plugins - avoid deleted/deprecated callback functions, instead use modern interface that was introduced a longer time ago (https://github.com/ansible-collections/ansible.posix/issues/650)."
|
||||||
|
|
@ -124,10 +124,7 @@ class CallbackModule(CallbackBase):
|
||||||
def v2_playbook_on_handler_task_start(self, task):
|
def v2_playbook_on_handler_task_start(self, task):
|
||||||
self._record_task(task)
|
self._record_task(task)
|
||||||
|
|
||||||
def playbook_on_setup(self):
|
def v2_playbook_on_stats(self, stats):
|
||||||
self._display_tasktime()
|
|
||||||
|
|
||||||
def playbook_on_stats(self, stats):
|
|
||||||
# Align summary report header with other callback plugin summary
|
# Align summary report header with other callback plugin summary
|
||||||
self._display.banner("ROLES RECAP")
|
self._display.banner("ROLES RECAP")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,10 +209,7 @@ class CallbackModule(CallbackBase):
|
||||||
def v2_playbook_on_handler_task_start(self, task):
|
def v2_playbook_on_handler_task_start(self, task):
|
||||||
self._record_task(task)
|
self._record_task(task)
|
||||||
|
|
||||||
def playbook_on_setup(self):
|
def v2_playbook_on_stats(self, stats):
|
||||||
self._display_tasktime()
|
|
||||||
|
|
||||||
def playbook_on_stats(self, stats):
|
|
||||||
# Align summary report header with other callback plugin summary
|
# Align summary report header with other callback plugin summary
|
||||||
self._display.banner("TASKS RECAP")
|
self._display.banner("TASKS RECAP")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue