ansible/ansible — pull request #482 by dhozac (2012-06-16 11:17:35+00:00)
Title: Iterative template

This is for variables containing variables. The implementation is potentially a bit too simplistic, and it does have performance implications.

Here are the times (in seconds) 100000 iterations took on my laptop with the unmodified code, modified with a plain variable and modified with a variable in a variable.

varReplace-based template: 0.87
varReplace-based iterative template: 1.22
varReplace-based iterative template (2 iterations): 2.05
Jinja2-based template: 70.03
Jinja2-based iterative template: 117.72
Jinja2-based iterative template (2 iterations): 185.16