mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
Allow groups to be passed to runner API to make parse_hosts optional, misc fixes as a result of refactoring in Runner.
Cleanup in Playbooks module is next.
This commit is contained in:
parent
94605b811b
commit
a8c921cbcc
4 changed files with 44 additions and 33 deletions
|
@ -257,7 +257,7 @@ def varReplace(raw, vars):
|
|||
# Determine replacement value (if unknown variable then preserve
|
||||
# original)
|
||||
varname = m.group(1).lower()
|
||||
replacement = vars.get(varname, m.group())
|
||||
replacement = str(vars.get(varname, m.group()))
|
||||
|
||||
start, end = m.span()
|
||||
done.append(raw[:start]) # Keep stuff leading up to token
|
||||
|
@ -268,7 +268,7 @@ def varReplace(raw, vars):
|
|||
|
||||
def template(text, vars):
|
||||
''' run a text buffer through the templating engine '''
|
||||
text = varReplace(text, vars)
|
||||
text = varReplace(str(text), vars)
|
||||
template = jinja2.Template(text)
|
||||
return template.render(vars)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue