top | item 46846572

(no title)

Hackbraten | 29 days ago

I see. I still wonder if the criticism is warranted in the particular context of Ansible playbooks.

First of all, who except Ansible (and ansible-lint) would even want to consume Ansible's YAML?

Regarding anchors: those are not idiomatic in Ansible at all, thanks to Ansible offering first-class support for object reuse on application level (e.g. variables and facts).

I wonder if TFA's pounding on YAML might be undeserved in this particular context.

discuss

order

ktpsns|29 days ago

I don't think YAML syntax is the core problem but understanding them as text files and not as serialized dicts/maps and lists.

Hell starts to open when people use string template languages to generate YAML files, such as in Helm charts. This is stupid because the templating language is not aware of the host language semantics. It is quite similar to the SQL or HTML injection problem we fought 20yrs ago and finally overcame with templated queries and auto-escaping.