Ansible deployment question

I spent a few hours today reading up on Ansible.

Up until now I’ve used Vagrant / Puppet, and I think you made the right choice in terms of Ansible.

One of the goals of the creator of Ansible was to simplify the provisioning and deployment process. He was saying in a video that one of his goals to was do away with having to use Capistrano.

If we can both provision environment and deploy with the same Ansible configuration, does it make sense to have another step with Capistrano?

I guess the reason the guys behind roots kept the Capistrano script is that it is a more mature piece of software then Ansible. Remember also that an important idea behind the “roots philosophy” is the 12 factor app. Meaning Capistrano is in line with the philosophy as a mature and tested piece of software, while Ansible is quite young and at times buggy. There are other benefits to Capistrano over Ansible (as I have understood it) such as being able to roll back a deploy etc.

There’s two good philosophies that often contradict:

  1. Use the best tool for each problem
  2. Minimize tools (and complexity) by standardizing on one

We went with Capistrano because it’s good at what it does, and specialized for deployments. Downside to it is obviously having to know and deal with the Ruby/Gems ecosystem.

Ansible can easily, and maybe should, do your deployments. I’ve thought about this and looked into it. And it may be something we do in the future. There’s a guy who created roles in Ansible that pretty much replicate Capistrano exactly. is kind of Rails specific but in the README it’s just a wrapper for two more generalized roles he’s made.

Wondering if, 4 months on from when this thread was started, you still feel like Capistrano > Ansible for deployments?

Over the last few weeks I’ve started a new set of environments that are based on CentOS instead of Abuntu (see Bedrock-ansible....and production?). The digest is that I took and mixed in the best parts of roles from Bedrock-Ansible with differences needed for CentOS vs Ubuntu.

I quite enjoy the Ansible approach to things and am going to explore using it instead of Capistrano for a few reasons:

– it gives excellent output + logs when executing
– I find it far easier than Chef / Puppet to create and mix roles / playbooks
– Eliminate not only another tool, but another language (Ruby) that has irked me in the past.
– Reading more about Ansible Architecture seems like this is a growing track of use

I’ve also got as an excellent example too. If you have any other links / tips / suggestions towards deployments via Ansible I’d love to know about them.

I’d probably go with Ansible if I was starting from scratch today. Capistrano is still really great and I still do Ruby dev daily so that part doesn’t bother me.

Here’s a great Gist I’ve seen which replicated Capistrano functionality in Ansible:

Basically all the best parts of Capistrano without using it!

1 Like