First thoughts about Ansible


Yesterday I’ve joined a workshop @IT Gilde about Ansible from Marcel Nijenhof. Ansible is an automation language next to Puppet, CFEngine etc.

I will write mostly about Ansible compared to Puppet, cause that’s what I know 🙂 Ansible is easy in many ways. Installation is just a bunch of python code. Available with your favorite package manager or git clone. No need for databases or agent server set-ups. There’s no agent! All you need is ssh access and python. If running less than python 2.5 you will need simple-json as well.

The automation language is Hiera which relies heavily on indentation, this will result in good readable code for you and your colleagues. These are called playbooks. From the playbooks you can call modules which are your tools for installation of packages, cronjobs, users, but also a shell module.

Code reusability is taken care of with roles. Here you can use vars which are for example extracted from your <host>.yaml file. This is the same like puppet. Where you can have for example a Web or DB role. The language seems to be pretty easy. Less steep learning curve than puppet.

Anything negative? Yes, Ansible is pretty young. Chance of hitting a bug is bigger than other products. Development and changes are going fast. Maturity of the production is something that has to be seen.

The thing I love about Ansible is the few resources you need. If you arrive at a customer without automation, a somewhat smaller environment and quickly need to change stuff. It’s pretty hard convince a complete company to have a puppet server set-up. While with Ansible all you need is ssh access and python on the client. You have your playbooks on your laptop, when you have access to the network you can start. There’s support for jumphosts as well. Ad hoc usage seems also to be a good thing. Remember for example shellshock? Quickly need to patch something? A small playbook is quickly written which you can use at all your customers.

I’m looking forward to actually using Ansible and let you know about my findings 🙂

Leave a comment

Your email address will not be published. Required fields are marked *