From 681082e47c84e7a5538c3ccc7c05b6e7f8464369 Mon Sep 17 00:00:00 2001 From: Jonathan Brown Date: Mon, 25 Feb 2019 11:57:29 -0500 Subject: [PATCH] Unixy stdout callback: Display name of play and list of play hosts, don't display play name if no hosts in play (#32810) --- lib/ansible/plugins/callback/unixy.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/plugins/callback/unixy.py b/lib/ansible/plugins/callback/unixy.py index c15d65784a6..b99ed4280a9 100644 --- a/lib/ansible/plugins/callback/unixy.py +++ b/lib/ansible/plugins/callback/unixy.py @@ -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"---"