summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjctanner <tanner.jc@gmail.com>2013-12-02 19:04:18 +0100
committerjctanner <tanner.jc@gmail.com>2013-12-02 19:04:18 +0100
commit6d80c50fafd371fb8a24d1a0a19e9db996b60199 (patch)
tree819b6df29b72257783f9912af7ef4b2b51c278e6 /bin
parentFixes #4796 handle unicodedecode errors from dmidecode output (diff)
parentExit 0 with no matched hosts (diff)
downloadansible-6d80c50fafd371fb8a24d1a0a19e9db996b60199.tar.xz
ansible-6d80c50fafd371fb8a24d1a0a19e9db996b60199.zip
Merge pull request #4817 from j2sol/zero-exit
Exit 0 with no matched hosts
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ansible4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ansible b/bin/ansible
index f8c72234c8..3d4cb07ad9 100755
--- a/bin/ansible
+++ b/bin/ansible
@@ -81,8 +81,8 @@ class Cli(object):
inventory_manager.subset(options.subset)
hosts = inventory_manager.list_hosts(pattern)
if len(hosts) == 0:
- callbacks.display("No hosts matched", stderr=True)
- sys.exit(1)
+ callbacks.display("No hosts matched")
+ sys.exit(0)
if options.listhosts:
for host in hosts: