Skip to content

Commit 2c7b6e9

Browse files
author
Lee Garrett
committed
Don't pass deprecated disable_lookups to template function (fixes: #4592)
From the ansible 2.19 release notes: - templating - The ``disable_lookups`` option has no effect, since plugins must be updated to apply trust before any templating can be performed. So remove it.
1 parent 2b3f836 commit 2c7b6e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ansiblelint/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def ansible_template(
177177
"""Render a templated string by mocking missing filters.
178178
179179
In the case of a missing lookup, ansible core does an early exit
180-
when disable_lookup=True but this happens after the jinja2 syntax already passed
180+
but this happens after the jinja2 syntax already passed
181181
return the original string as if it had been templated.
182182
183183
In the case of a missing filter, extract the missing filter plugin name
@@ -201,7 +201,6 @@ def ansible_template(
201201
re_valid_filter = re.compile(r"^\w+(\.\w+\.\w+)?$")
202202
templar = ansible_templar(basedir=basedir, templatevars=templatevars)
203203

204-
kwargs["disable_lookups"] = True
205204
for _i in range(10):
206205
try:
207206
if TrustedAsTemplate and not isinstance(varname, TrustedAsTemplate):

0 commit comments

Comments
 (0)