1
0
Fork 0
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:
Jonathan Brown 2019-02-25 11:57:29 -05:00 committed by Brian Coca
parent e287b35f69
commit 681082e47c

View file

@ -100,11 +100,9 @@ class CallbackModule(CallbackBase):
self._display.display("%s (via handler)... " % self.task_display_name)
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()
if name:
msg = u"\n- %s -" % name
if name and play.hosts:
msg = u"\n- %s on hosts: %s -" % (name, ",".join(play.hosts))
else:
msg = u"---"