Extending YAML to support {{ at the beginning of a value

Hi,

Ansible handles pretty well the incompatibility between YAML and Jinja templates with a nice, informative, explicit error message. I suppose this is so because writing foo: {{ bar }} is an extremely common pattern and most users face the error. The workaround is simple but still, annoying.

Was there any thoughts about forking the YAML parser to extend the syntax? This kind of syntax extension is not really grammar-breaking and would be a nice improvement in playbooks.

Regards,
Warren.

I would saying forking the YAML module is an absolutely terrible idea.

I agree that forking is not a very good option for such a little addition, though the YAML Python library hasn’t been updated for 6 years, so there’s no risk missing a big upstream update anyway.

On the other hand, your answer is not really helpful here. What would be the optimal solution to avoid this issue? Should we not care?

I guess there is a possibility that we create our own loader/scanner/parser. But in the end, I don’t really care, I don’t find it hard to remember to wrap ninja statements in quotes.

On another note, this is more suited for ansible-devel and not ansible-project.