3 ms·
Ansible would be so, so much better if it just used plain JSON, or even JS with an implied context for variables, .eslintrc.js style.
by crooked-v 8y ago
Ansible would be so, so much better if it just used plain JSON, or even JS with an implied context for variables, .eslintrc.js style.
- geerlingguy 8y agoYou can usually use plain old JSON anywhere where YAML would be used (e.g. host vars, group vars, vars file includes, I think even playbooks). And internally, most everything in Ansible is JSON anyways. YAML is for convenience for hand-editing configuration/task files; if you're doing anything that doesn't require hand editing/readability, use JSON.
- koffiezet 8y agoYou can, but you lose the possibility of comments, and writing JSON by hand is also a pain in the ass...