Going from Cap to Ansible

I’ve been using Capistrino on one of my older Bedrock projects. I want to convert it to using the deploy system built into ansible.

I don’t have the ability to spin up a new server, as my client is using a 200/mo box at Media Temple. What steps should I take to verify that nothing gets broke? For example, right now all the files are owned by deploy and the server currently has an SSL certificate.

In a way the deploy playbook can be completely separate from the provisioning playbooks. The only thing the deploy playbook requires is a parent directory with permissions to create folders/files.

Our server.yml playbook creates /srv/www/site_name with the proper permissions and then the deploy.yml playbook takes over from there creating the proper directory structure within that and closing the repo + setting symlinks.

So in your case you can just set the web_user variable to deploy. There’s probably going to be some other variables to customize like the normal wordpress_sites and the paths. Your Nginx/Apache config including SSL is separate and wouldn’t be affected by this.

Also remember your virtual host web root would need to point to the deploy location including current/.


In addition to what Scott’s mentioned, ideally you would have a similar (not $200, probably lower specced but same operating system and installed apps, server) as a staging server you could test this on.

You mention Bedrock, is it actually a server provisioned by bedrock-ansible/Trellis though? While I understand having less tools to manage is good, since Ansible deploys basically mirror Capistrano deploys, it might be worth asking if making the switch is really worth it. If it ain’t broke…


We have a secondary cheaper server, that I am testing on. It was provisioned by trellis. Quoting the “If it ain’t broke”, it did for some reason after I switched my Nameservers to Cloudflare. I’m no longer able to ssh in as the deploy user to run the ssh commands, and I cannot figure out why. I use ansible deploys for about 4 others clients, so this is just what I’m used to at this point.