3 ms·
Ansible uses Jinja2 to output templates in whatever format is preferred by the thing being configured. I haven't personally seen Ansible used to output YAML...
by geerlingguy 10y ago
Ansible uses Jinja2 to output templates in whatever format is preferred by the thing being configured. I haven't personally seen Ansible used to output YAML... But people will do anything :-P
Ansible does use YAML as a configuration language though—something for which it's perfectly suited.
- spdionis 10y agoWell, some frameworks use yaml for config files and you might use ansible to write those. That said the templating is usually trivial, just maybe write some string values.
- cytzol 10y agoI’ve done it. It’s painful enough that it teaches you “don’t do this!”. For example, you need to escape `{{ item }}` as `{{ "{{" }} item {{ "}}" }}`!