Fix hostvars lookup of locahost based on 5f1bbb4

(cherry picked from commit b51d0dd69b)
pull/16362/head
James Cammarata 9 years ago
parent 00cf1cbac1
commit c9b125d21a

@ -62,7 +62,11 @@ class HostVars(collections.Mapping):
self._inventory = inventory
def _find_host(self, host_name):
return self._inventory.get_host(host_name)
if host_name in C.LOCALHOST:
host = self._inventory.localhost
else:
host = self._inventory.get_host(host_name)
return host
def __getitem__(self, host_name):
host = self._find_host(host_name)

Loading…
Cancel
Save