This is not meant to be anything as formal as the “Zen of Python”, but I figured I’d type it up since we’ve multiplied userland by 100x since we last talked about the design goals of the system.
I tend to be detecting a lot of questions about “how do I do super-complicated-thing” lately, and wanted to avoid the impression that I’m trying to squash that discussion any.
However, it’s true… Ansible as a project dislikes complexity! This I do
try to squash, and I am going to fight to make sure we maintain that current aesthethic, and simple way that we can explain everything to everyone.
Ansible playbooks are meant to be minimialistic and simple, super easy to read, very little to guess about. A small number of concepts, not a lot.
Playbooks are about plain English, and I like to talk in plain English too. That means everything we do need to be simple to explain, and that means there should be (as Python says) one logical way to do something (rather than like 5).
In that vein, if you find yourself trying to be clever, to over abstract, etc, in writing content, I’d say step back a bit and trust the system for a while, and see if you REALLY need those levels of academic abstraction.
Ansible wants you to follow an easier path. I won’t say things can’t evolve, but we do and will actively resist expanding the syntax until there’s a vast visible need for new syntax. (Roles came in for 1.2 because of one of those needs and I’m pretty happy with them fitting in with the aesthethic), but I’m also cautious about seeing things evolve
too quickly.
If you come from a development background, you’ll quickly note Ansible is not meant to be a programming language. Over the last year we’ve adopted some ‘pluggable’ things that can make playbooks complicated, I’d recommend not racing into needing to use them all at
once. Lookup plugins? You probably won’t need them initially. Etc.
Think of it more as a modelling system (like Legos?) than a programming language.
It’s not meant to be a tool you should have to obsess over, and it believes “perfect is the enemy of good” in many cases. Ansible
wants you to get something done and move on and go back to do
something else that is not Ansible
The idea with Ansible is you should be able to write some content, get it working, and not touch it again… You shouldn’t have to edit Ansible content every single day, it wants to help you and be unobstrusive.
We care a lot about backwards compatibility, and try to keep things working. For this reason, we also move slow on language changes and make sure there’s a very well validated need for them among a large percentage of user land.
However, we move fast on modules… we’ll include modules for all kinds of popular services.
We try to minimize syntax and new things, and things with lots of buzzwords that make it hard to explain, or make the technology less suitable for newcomers. This means both computer-sciencey terminology as well as meme-related things. We could have choosen to associate everything with names composed with some components of the sheep shearing industry (arbitrarily), but did not, on purpose. Thus, also in conversations, we value directness and simple real world examples, rather than theory.
Finally, what we are building here is not just a configuration management tool – but a tool that can be used for configuration, app deployment, and general IT orchestration purposes. As a result, some things are going to be more flexible and open ended. Also as a result, attempting to apply strictly configuration management based ideas to things may also not quite always fit 100%. We’re not just automating the one-node-standing alone, etc.
We try to be different by not porting every single idea from every other tool out there – but modelling what works, and in ways that make Ansible efficient to help you work on content.
So anyway, I hope that helps make it a bit clear where I am coming from, especially from the influx of new folks coming from other toolchains.
Don’t try to port all of your previous systems over directly, but see how they fit naturally, and I think you’ll find it more enjoyable!
Anyway, I hope that explains – just a bit – my views on complexity, language evolution, and why I’m not super anxious to throw in a lot of new concepts.
We have a SUPER large community that could easily take us in 5000 different directions at once, and I think if Ansible is to stay true to itself, it ponders all of them really carefully, least it fall down the traps of previous projects – where it becomes really hard to explain, full of inconsistencies and secret hard-to-acquire knowledge and so on.
There you have it