mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Another fix for --limit in adhoc
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user