by swiley · 6y ago · 0 comments
There are so many things I hate about ansible.
Here's an example of a JSON coded query taken from a PuppetDB tutorial (PuppetDB uses a very lispy query language):
["and",
["=", "type", "User"],
["=", "title", "nick"]]
And the same code as you could write it in native s-expressions: (and
(= :type "user")
(= :title "nick"))
...and one way you could encode it in yaml... - and:
- =:
- type
- user
- title:
- title
- nick - filters:
- operant: =
type: user
- operant: =
title: nick
if the module author wants to, he could even remove the secondary list because its the same operator, making this - filters:
- operant: =
type: user
title: nick
thats just as readable as your other examples imo.
yaml doesnt have to be an unreadable mess. its just possible to make bad apis, which remains true for yaml just as for any other format.