Re:Ansible 2.1 Released, with Network Automation, Containers
by collyw on Friday May 27, 2016 @07:08AM
(#11785179)
JSON is crap for configuration. Its picky with quotes, doesn't like trailing commas, and isn't as readable as other options.
Re:Ansible 2.1 Released, with Network Automation, Containers
by threatofrain on Friday May 27, 2016 @09:57AM
(#11786042)
JSON is the example, not the prescription; JSON is just a widely used format for arbitrarily nested data. You can use Javascript objects (or Python dictionaries) if you want. Again, this example applies for the scenario if Ansible playbooks were only configurations. If it were only configurations, then fine, let's go with readable YAML.
If Ansible were playbooks with only configurations, then even XML would be okay, because in the sum of all pros and cons, this would be a tiny factor. The pickiness of quotes and trailing commas is really whatever here.
But instead Ansible playbooks use a "readable" YAML-ish language. The price is not right.
The problem is that because people want logic, Ansible ended up introducing an idiosyncratic YAML-templating language that's not actually YAML or anything else. Now people write large system deployment scripts in this weird YAML that I don't ever want to look at.