mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Template using module_vars early
Since no basedir is available at that time, avoid invoking lookup plugins since they assume it is present.
This commit is contained in:
@@ -215,7 +215,8 @@ def template(basedir, text, vars, expand_lists=False):
|
||||
except UnicodeEncodeError:
|
||||
pass # already unicode
|
||||
text = varReplace(unicode(text), vars, expand_lists=expand_lists)
|
||||
text = _varReplaceLookups(basedir, text, vars)
|
||||
if basedir is not None:
|
||||
text = _varReplaceLookups(basedir, text, vars)
|
||||
return text
|
||||
|
||||
def template_from_file(basedir, path, vars):
|
||||
|
||||
Reference in New Issue
Block a user