Another fix for --limit in adhoc

pull/12471/head
James Cammarata 9 years ago
parent babf47decb
commit c860775b5d

@ -119,7 +119,7 @@ class AdHocCLI(CLI):
if 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
raise AnsibleError("Specified --limit does not match any hosts")

Loading…
Cancel
Save