mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 05:19:09 -07:00
fixed hostvars access in conjunction with --limit usage
This commit is contained in:
parent
0441a7a217
commit
81bf88b6e0
2 changed files with 11 additions and 9 deletions
|
@ -43,7 +43,7 @@ class HostVars(collections.Mapping):
|
|||
# in inventory
|
||||
restriction = inventory._restriction
|
||||
inventory.remove_restriction()
|
||||
hosts = inventory.get_hosts()
|
||||
hosts = inventory.get_hosts(ignore_limits_and_restrictions=True)
|
||||
inventory.restrict_to_hosts(restriction)
|
||||
|
||||
# check to see if localhost is in the hosts list, as we
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue