My experience using Ansible for deployment
When I moved to a new server infrastructure and host for Simplero around the new year, I decided I wanted system to manage the setup, so that the configuration of my servers would be defined in code I can check in to github, rather than just a collection of stuff on the server that happens to work, but no-one really remembers exactly what was installed or how or where. Replication and documentation. Important stuff.
I looked at a couple of different options. I looked at Chef and Puppet, which seems to be two of the big boys. I think I also looked at a few others, besides the system I ended up choosing: Ansible.
I like the idea behind Ansible. You don’t need a daemon on the server. Everything is done over SSH. There’s no magic (or at least not too much). Everything is defined in simple plaintext files that you cane easily manage.
In practice, though, I find that Ansible gets in the way more than it helps. I find that I spend 90% of my time trying to figure out how to get Ansible to do what I want, and about 10% of my time working on what I actually want to accomplish on my server.
So rather than just run a couple of commands, see if they did what I wanted them to, and if not, doing something else, I now spend most of my time trying to convince Ansible to run those commands for me in a meaningful way. And each time, I have to run the entire playbook in order to test one step at the end.
It also bothers me that almost all of the files end up being named the same. They’re all main.yml. It’s the location of the file that matters. That makes it super confusing to edit my scripts when you need to work with several of these files at the same time, because all of the tabs in my editor are labeled the same.
I haven’t found a system I like better (I haven’t looked, either). I’m staying with Ansible for now, because it would be way more work to try and replace it at this point, especially since I don’t know what I’d replace it with.
I just wanted to write this post so that if people are searching for experiences about using Ansible, they’d have this perspective too to take into consideration. Just trying to be helpful here.
Have a super duper day.
About Calvin Correli
I've spent the last 17 years learning, growing, healing, and discovering who I truly am, so that I'm now living every day aligned with my life's purpose.
4 comments
Leave a comment