mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Move templating into a utils function. Reuse is our friend.
This commit is contained in:
parent
c1fe0dd719
commit
af9596307d
3 changed files with 17 additions and 11 deletions
|
@ -24,7 +24,6 @@ import signal
|
|||
import os
|
||||
import Queue
|
||||
import random
|
||||
import jinja2
|
||||
import traceback
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
@ -326,8 +325,7 @@ class Runner(object):
|
|||
else:
|
||||
args = "%s metadata=~/.ansible/setup" % args
|
||||
|
||||
template = jinja2.Template(args)
|
||||
args = template.render(inject_vars)
|
||||
args = utils.template(args, inject_vars)
|
||||
|
||||
argsfile = self._transfer_argsfile(conn, tmp, args)
|
||||
if async_jid is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue