32 lines
1.3 KiB
YAML
32 lines
1.3 KiB
YAML
---
|
|
- name: upload + extract rookeries package to web server home
|
|
unarchive: src={{ rookeries_package_path }} dest={{ web_root_path }}
|
|
sudo: yes
|
|
register: ready_to_deploy
|
|
ignore_errors: True
|
|
|
|
- command: echo Hello {{ app_root_path }}
|
|
|
|
- name: install rookeries dependencies
|
|
pip: requirements=requirements.txt virtualenv={{ rookeries_venv }} chdir={{ app_root_path }}
|
|
when: ready_to_deploy|success
|
|
|
|
- name: install extra MySQL python connector dependency
|
|
pip: name=mysql-connector-python virtualenv={{ rookeries_venv }} version=1.1.6
|
|
extra_args='--allow-external mysql-connector-python --allow-unverified mysql-connector-python'
|
|
when: ready_to_deploy|success
|
|
|
|
- name: fix permissions on extracted web app
|
|
file: path={{ app_root_path }} owner={{ web_server_group }} group={{ web_server_group }}
|
|
state=directory recurse=yes
|
|
when: ready_to_deploy|success
|
|
|
|
# TODO Step 4 - Setup environment variables on target system related to config.
|
|
|
|
- name: install bower dependencies in app
|
|
command: bower install --allow-root --quiet chdir={{ web_root_path }}/rookeries_webapp
|
|
notify: restart uwsgi app
|
|
when: ready_to_deploy|success
|
|
# TODO Replace with bower command in future version of Ansible (1.9.0)
|
|
# bower: path={{ app_root_path }} state=present
|