imbal/safeyaml

Ansible playbooks

Opened this issue · 2 comments

The conventions around ansible playbooks possibly mean they are never going to be safeyaml compliant. For example, they encourage starting files with the --- separator, and make extensive use of lists-of-maps.

As far as I can tell, the --- separator is for separating out a stream of objects, which seems like a feature geared towards a serialization/deserialization use case. I'm not at all interested in supporting that use case, so at first blush it seems like we should strip it out if we find it, and error out if we find that the input is in fact a stream of multiple objects.

Thoughts on lists-of-maps here: #4 (comment)

tef commented

We can strip out the first or last --- possibly. Right now, it errors on sight