You can specify role dependencies in ansistrano.deploy/meta
but that would only allow you to specify one dependency step with Ansistrano unless you split it out into separate roles.
Which is exactly what I suggest that you do. I am not familiar with Capistrano, but reading through the Ansistrano role, it's mostly is just layering on another layer of abstraction through clever use of variables for those more familiar with Capistrano than Ansible.
Use the Capistrano deployment workflow and rollback technique with symlinks to create individual roles and deploy.yml
rollback.yml
playbooks which call those roles in the order you specify.
Here's an example playbook with all possible steps as roles, but you would only need to create those which you actually use.
---
- hosts: all
roles:
- pre-setup
- setup
- pre-update
- update-code
- pre-symlink-shared
- symlink-shared
- pre-symlink
- symlink
- pre-cleanup
- cleanup
- post-cleanup