mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Adding in hostvars to v2 and getting more integration tests working
This commit is contained in:
parent
f9d451eb9c
commit
45212394ca
9 changed files with 85 additions and 8 deletions
|
@ -71,7 +71,8 @@ class AnsibleJ2Vars:
|
|||
|
||||
# HostVars is special, return it as-is, as is the special variable
|
||||
# 'vars', which contains the vars structure
|
||||
if isinstance(variable, dict) and varname == "vars": # or isinstance(var, HostVars):
|
||||
from ansible.vars.hostvars import HostVars
|
||||
if isinstance(variable, dict) and varname == "vars" or isinstance(variable, HostVars):
|
||||
return variable
|
||||
else:
|
||||
return self._templar.template(variable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue