From 6caad9ac8fd584b51467e5df99b1330d6aec3b18 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 28 Jul 2014 10:48:22 -0400 Subject: [PATCH] No hosts matched goes to stderr. --- bin/ansible | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ansible b/bin/ansible index aa6941a7c2..f236c83269 100755 --- a/bin/ansible +++ b/bin/ansible @@ -94,7 +94,7 @@ class Cli(object): inventory_manager.subset(options.subset) hosts = inventory_manager.list_hosts(pattern) if len(hosts) == 0: - callbacks.display("No hosts matched") + callbacks.display("No hosts matched", stderr=True) sys.exit(0) if options.listhosts: @@ -132,7 +132,7 @@ class Cli(object): inventory_manager.subset(options.subset) hosts = inventory_manager.list_hosts(pattern) if len(hosts) == 0: - callbacks.display("No hosts matched") + callbacks.display("No hosts matched", stderr=True) sys.exit(0) if options.listhosts: