1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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:
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")