The Zen of Ansible?

I have heard rumours that there is a mystic who enlightens his disciples with the Zen of Ansible…

I have even seen some bits and pieces of his teachings along the way, but was wondering if there was a more definitive source somewhere.

Here is some of the advice I have seen attributed to this sage:-

Keep things simple.

Don’t think about trying to read what some default value is. Just use the value that makes it through, knowing that the right value made it through.

Once you get the bare minimum to automate application X, stop.

It’s not supposed to be a super-elegant software construct, or even a programming language. It’s a language for getting things done.

And paraphrasing…

If your Jinja2 templates are getting complex perhaps you are doing it wrong.

Hacks should be shunned.

OK I admit it was Michael DeHaan who said these things, but I was seriously wondering if there was a definitive guide to “The Zen of Ansible”.

Sometimes I have resorted to “hacks” when a different way might have been cleaner… (my hack to bring crontab entries under support of the cron module definitely qualifies as a hack, replacing the file might be cleaner, but has distinct issues as well).

Does such a document exist? If it doesn’t should it?

Adam

No such guide. Maybe it should. I need to think about what it might say.

Ultimately it’s probably best to show the hack and ask how to do it better when you see the specific hack.

I’ve also been thinking a bit about a “tuning” section, as I’ve been seeing a fair amount of people who aren’t aware of accelerate mode or ControlMaster/pipelining even though they are in the docs. There are some other tricks to put in there as well (forks, with_items for package operations, etc).