Daniel Hokka Zakrisson
a79373f6b2
Make template_ds the only templater
...
Instead of having to remember when to use which one, rename template_ds
to template and move the last bit of code from template to varReplace
(which gets used for all string replacements, in the end).
This means that you can template any data type without worrying about
whether it's a string or not, and the right thing will happen.
13 years ago
Daniel Hokka Zakrisson
b79960e13b
If failed lookups are fatal, re-raise the exception
...
Fixes #1938 .
13 years ago
Daniel Hokka Zakrisson
864b75e54b
Override Jinja2 Template class to make {% include %} work again
...
Fixes #1908 .
13 years ago
Daniel Hokka Zakrisson
87b2378e22
Resolve variable references inside variables
...
Fixes the case where variable x is '$y' and y is a dict(foo='bar') and
an attempt to access ${x.foo} is made.
13 years ago
willthames
411b2bf7d9
Added additional template variables
...
Added two additional template variables
* template_fullpath - absolute path to the template
* template_run_date - date that the template was rendered
Documented these additional variables in the module documentation
13 years ago
Daniel Hokka Zakrisson
3a36c024da
Make lookups being fatal up to the caller
...
Fixes #1769 .
13 years ago
Daniel Hokka Zakrisson
0f1706220b
Add support for using the Jinja2 built-ins such as range
13 years ago
Brian Coca
d7f38d07b3
fixed bug for string size mismatch, now substring depends on size of match string Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
13 years ago
Brian Coca
6a1e2aaff5
moved override matching string to variable changed test template to match Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
13 years ago
Brian Coca
68f5d69365
added ability to override jinja enviornment from first line of template Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
...
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
13 years ago
Daniel Hokka Zakrisson
e74ffd6764
Lookup plugin arguments need to be templated
13 years ago
Daniel Hokka Zakrisson
c200c26ced
Keep hostvars from being templated
13 years ago
Daniel Hokka Zakrisson
25a8787e95
Template all variables before returning them to Jinja2
13 years ago
Daniel Hokka Zakrisson
d2dce1d63f
Make lookup plugin replacements part of the main variable logic
13 years ago
Daniel Hokka Zakrisson
a2bb3a09d2
Completely ignore stray $ in input
...
Previously, "a $ string $var" would not have gotten replaced at all.
13 years ago
Daniel Hokka Zakrisson
24b536d7ed
Add some comments to templating system
13 years ago
Daniel Hokka Zakrisson
233a36b9e8
Template using module_vars early
...
Since no basedir is available at that time, avoid invoking
lookup plugins since they assume it is present.
13 years ago
Michael DeHaan
c890ae18e7
Merge pull request #1575 from dhozac/parameterized-playbook-include
...
Add parameterized playbook includes
13 years ago
Daniel Hokka Zakrisson
9924555623
Add support for generic $XXX() to call $LOOKUP()
13 years ago
Daniel Hokka Zakrisson
383dc30560
Rename varReplaceWithItems to template_ds
13 years ago
Daniel Hokka Zakrisson
47082a9171
Add $LOOKUP(<lookup plugin>,<data>) as a templating option
...
Also moves file and pipe to lookup_plugins.
13 years ago
Jeroen Hoekx
8ffed6df75
Support custom jinja2 filters.
...
This uses the plugin framework to add filter plugins.
The previously hardcoded core filters are defined using the plugin
framework now.
13 years ago
Daniel Hokka Zakrisson
000d3832cc
Make ansible.utils a package
13 years ago