fixed hostvars access in conjunction with --limit usage

This commit is contained in:
Ilya Epifanov 2015-08-26 21:41:52 +03:00
parent 0441a7a217
commit 81bf88b6e0
2 changed files with 11 additions and 9 deletions

View file

@ -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