-
-
Save wmudge/a41d8d35fd9e95a4980bfb2e2fa4e459 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[localhost] TASK: install package (debug)> from jinja2 import Environment | |
[localhost] TASK: install package (debug)> e = Environment() | |
[localhost] TASK: install package (debug)> t = e.from_string(task.args['msg']) | |
[localhost] TASK: install package (debug)> t.render(task_vars) | |
'foo' | |
or | |
[localhost] TASK: install package (debug)> from ansible.template import Templar | |
[localhost] TASK: install package (debug)> templar = Templar(loader=None, variables=task_vars) | |
[localhost] TASK: install package (debug)> templar.template(task.args['msg']) | |
'foo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment