Jinja2 control in playbook ?

Hello,

I have a question I couldn't answer reading this list.
Is it possible in a playbook to use Jinja2 control ?

Presently, it's not possible to slurp the contents of a file directly
into a playbook.

What I proposed before, and we didn't implement yet, was to give a way
for the basic templating code to load the contents from a file.

Basically I'm thinking of some magic syntax in the utils.template code like:

<<$path>>

This would be a super-trivial patch if someone wants to try to add it.

It might be nice to enable Jinja2 also, but Jinja2 itself is somewhat
slow, and we execute the templating engine extremely often (calling it
several
times on very small strings), so I have a note to attempt to re-enable
this and run some benchmarks.

I also do not want folks to think playbooks are legal to include any
Jinja2 syntax, because if you start doing ifs and such in Jinja2,
there are a lot of corner cases
where people will tend to assume things work remotely or locally, and
they'll get them wrong -- and in short, it will be confusing.

This is why Jinja2 syntax is currently confined to file templates.