Commit c860775b by James Cammarata

Another fix for --limit in adhoc

parent babf47de
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment