mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-03 15:10:21 -07:00
Allow using ${hostvars.<node>} for nodes not in SETUP_CACHE
This allows accessing inventory data from nodes that have not been talked to (yet).
This commit is contained in:
parent
7d43865e13
commit
dddfeac9c4
1 changed files with 3 additions and 0 deletions
|
@ -85,6 +85,9 @@ class HostVars(dict):
|
||||||
self.lookup[host] = result
|
self.lookup[host] = result
|
||||||
return self.lookup[host]
|
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):
|
class Runner(object):
|
||||||
''' core API interface to ansible '''
|
''' core API interface to ansible '''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue