Add: support for jinja2_native
This commit is contained in:
parent
cb70574fed
commit
f0dc98ac74
@ -86,6 +86,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable, Constructable):
|
||||
#self._consume_options(config_data)
|
||||
|
||||
# Get options from inventory
|
||||
self.jinja2_native = self.get_option('jinja2_native')
|
||||
self.strict = self.get_option('strict')
|
||||
self.compose = self.get_option('compose')
|
||||
self.groups = self.get_option('groups')
|
||||
@ -111,6 +112,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable, Constructable):
|
||||
scope=None,
|
||||
_templar=self.templar,
|
||||
_variables=host.get_vars(),
|
||||
jinja2_native=self.jinja2_native,
|
||||
#trace=True,
|
||||
#explain=True,
|
||||
)
|
||||
|
||||
@ -462,6 +462,7 @@ class AnsibleKheops():
|
||||
_variables=None,
|
||||
_process_scope=None,
|
||||
_process_results=None,
|
||||
jinja2_native=False
|
||||
):
|
||||
|
||||
_process_scope = _process_scope or self.config['process_scope']
|
||||
@ -471,7 +472,7 @@ class AnsibleKheops():
|
||||
scope = self.get_scope_from_host_inventory(_variables, scope=scope)
|
||||
elif _process_scope == 'jinja':
|
||||
assert _templar, f"BUG: We expected a templar object here, got: {_templar}"
|
||||
scope = self.get_scope_from_jinja(_variables, _templar, scope=scope)
|
||||
scope = self.get_scope_from_jinja(_variables, _templar, scope=scope, jinja2_native=jinja2_native)
|
||||
|
||||
ret = self.lookup(keys, namespace=namespace, scope=scope)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user