Hacker News new | ask | show | jobs
by susi22 3060 days ago
I'm a Clojure dev so I really like fast edit-compile cycles. Note, Ansible will happily take in JSON, so you can take your favorite language and write all the playbooks in that language. Just generate the playbooks on the fly (ie. genearte JSON not yaml) and shell out to ansible to run it. So you have all the features of ansible available but can arbitrarily build up your playbooks in your favorite language.

It's hacky code, but that's exactly what I did in Clojure: https://gist.github.com/rauhs/a72cfbeef4c80f9a58480484c49e7a...

With a normal REPL this works well especially when developing plays.

1 comments

> Ansible will happily take in JSON

Yes, JSON is very close to a proper subset of Yaml.