mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Unixy stdout callback: Display name of play and list of play hosts, don't display play name if no hosts in play (#32810)
This commit is contained in:
parent
e287b35f69
commit
681082e47c
1 changed files with 2 additions and 4 deletions
|
@ -100,11 +100,9 @@ class CallbackModule(CallbackBase):
|
||||||
self._display.display("%s (via handler)... " % self.task_display_name)
|
self._display.display("%s (via handler)... " % self.task_display_name)
|
||||||
|
|
||||||
def v2_playbook_on_play_start(self, play):
|
def v2_playbook_on_play_start(self, play):
|
||||||
# TODO display name of play and list of play hosts
|
|
||||||
# TODO don't display play name if no hosts in play
|
|
||||||
name = play.get_name().strip()
|
name = play.get_name().strip()
|
||||||
if name:
|
if name and play.hosts:
|
||||||
msg = u"\n- %s -" % name
|
msg = u"\n- %s on hosts: %s -" % (name, ",".join(play.hosts))
|
||||||
else:
|
else:
|
||||||
msg = u"---"
|
msg = u"---"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue