From cd930d2e34fdbc12b7ae4751c63351c2877efbf5 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 13 Dec 2012 13:31:41 +0100 Subject: [PATCH] Change message when a play matches no hosts I guess my previous pull request was confusing, by changing the message to something we already do for tasks, it makes it more clear. Just like we say: TASK: [foo bar] skipping: [system01] The message now is more clear: PLAY [wagawaga] ******************************* skipping: no hosts matched It makes it clear that we are skipping the play, just as is done for a task when a condition is not met. --- lib/ansible/callbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 961f5a0dfa..1fd47b35c5 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -421,7 +421,7 @@ class PlaybookCallbacks(object): call_callback_module('playbook_on_notify', host, handler) def on_no_hosts_matched(self): - print stringc("no hosts matched", 'red') + print stringc("skipping: no hosts matched", 'cyan') call_callback_module('playbook_on_no_hosts_matched') def on_no_hosts_remaining(self):