Another fix for --limit in adhoc

This commit is contained in:
James Cammarata 2015-09-28 10:39:33 -04:00
parent babf47decb
commit c860775b5d

View file

@ -119,7 +119,7 @@ class AdHocCLI(CLI):
if self.options.subset: if self.options.subset:
inventory.subset(self.options.subset) inventory.subset(self.options.subset)
if len(inventory.list_hosts()) == 0 and not no_hosts: if len(inventory.list_hosts(pattern)) == 0 and not no_hosts:
# Invalid limit # Invalid limit
raise AnsibleError("Specified --limit does not match any hosts") raise AnsibleError("Specified --limit does not match any hosts")