From 82011b043af2643a843ce9462834001300720972 Mon Sep 17 00:00:00 2001 From: Stoned Elipot Date: Tue, 5 Feb 2013 21:16:26 +0100 Subject: [PATCH] For ansible --list-hosts benefit apply hosts selection limits early --- bin/ansible | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ansible b/bin/ansible index 102390f42a7..f1d96e32d15 100755 --- a/bin/ansible +++ b/bin/ansible @@ -70,6 +70,8 @@ class Cli(object): pattern = args[0] inventory_manager = inventory.Inventory(options.inventory) + if options.subset: + inventory_manager.subset(options.subset) hosts = inventory_manager.list_hosts(pattern) if len(hosts) == 0: print >>sys.stderr, "No hosts matched"