Ansistrano (Ansible + Capistrano): Quick Start
In this post, I am going to try Ansistrano to deploy a file on a web server. (See this post this post for detail about Ansible) what is Ansistrano? " ansistrano.deploy and ansistrano.rollback are Ansible roles to easily manage the deployment process for scripting applications such as PHP, Python and Ruby. It's an Ansible port for Capistrano." ( https://github.com/ansistrano/deploy ) install % ansible-galaxy install ansistrano.deploy ansistrano.rollback create test file % mkdir -p public_html % echo 'hello' > public_html/index.html deploy % vim playbook.yml --- - name: deploy code hosts: webservers become: true vars: ansistrano_deploy_from: "{{ playbook_dir }}/public_html/" ansistrano_deploy_to: "/var/www/my-app" ansistrano_keep_releases: 3 ansistrano_deploy_via: "rsync" roles: - ansistrano.deploy See https://github.com/ansistrano/deploy for the vars to customize as needed. Run the playbook.