Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- # Deploy rails app from localhost to remote servers
- - name: Set up AWS infrastructure
- hosts: localhost
- connection: local
- roles:
- - setup_aws
- - name: Package app
- hosts: localhost
- vars:
- root_dir: ..
- roles:
- - package_app
- - name: Install ruby & nginx
- hosts: web
- gather_facts: yes
- roles:
- - install_ruby
- - role: install_nginx
- become: yes
- - name: Boot application
- hosts: web
- serial: 1
- gather_facts: yes
- roles:
- - role: webserver
- environment:
- RAILS_HOST: "{{ RAILS_HOST }}"
- SECRET_KEY_BASE: "{{ SECRET_KEY_BASE }}"
- DB_NAME: "{{ DB_NAME }}"
- DB_USERNAME: "{{ DB_USERNAME }}"
- DB_PASSWORD: "{{ DB_PASSWORD }}"
- DB_HOST: "{{ hostvars.localhost.rds.instance.endpoint }}"
- - name: Setup load balancing
- hosts: localhost
- roles:
- - role: setup_elb
Add Comment
Please, Sign In to add comment