summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
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: