Allow using ${hostvars.<node>} for nodes not in SETUP_CACHE

This allows accessing inventory data from nodes that have not been
talked to (yet).
parent 7d43865e
......@@ -85,6 +85,9 @@ class HostVars(dict):
self.lookup[host] = result
return self.lookup[host]
def __contains__(self, host):
return host in self.lookup or host in self.setup_cache or self.inventory.get_host(host)
class Runner(object):
''' core API interface to ansible '''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment