Migrate Ansible setup to use an external role to handle setup of the NGINX, UWSGI and supervisord setup.

Allow for greater reusability of Ansible playbooks.
This commit is contained in:
Dorian 2015-01-08 18:22:39 -05:00
parent 41a54c74e4
commit a634aac67f
5 changed files with 42 additions and 51 deletions

View File

@ -1,10 +1,17 @@
--- ---
- hosts: all
sudo: yes
roles:
- ansible-nginx-uwsgi-supervisor
tasks:
- include: pre_deployment/base_linux.yaml - include: pre_deployment/base_linux.yaml
- include: pre_deployment/python.yaml
- include: pre_deployment/mysql_db.yaml - include: pre_deployment/mysql_db.yaml
- include: pre_deployment/nginx.yaml vars:
- include: pre_deployment/supervisor.yaml databases:
- include: pre_deployment/web_data_folders.yaml rookeries:
username: rookeries
password: system_admin
- include: pre_deployment/nodejs.yaml - include: pre_deployment/nodejs.yaml
# TODO Add in globally defined values for webapp and virtualenv folders # TODO Add in globally defined values for webapp and virtualenv folders

View File

@ -1,8 +1,4 @@
--- ---
- hosts: all
sudo: yes
tasks:
- name: install vim - name: install vim
apt: pkg=vim state=present apt: pkg=vim state=present

View File

@ -1,13 +1,4 @@
--- ---
- hosts: all
sudo: yes
vars:
databases:
rookeries:
username: rookeries
password: system_admin
tasks:
- name: setup MySQL server + Python dependencies - name: setup MySQL server + Python dependencies
apt: pkg={{ item }} state=present apt: pkg={{ item }} state=present
with_items: with_items:

View File

@ -1,8 +1,4 @@
--- ---
- hosts: all
sudo: yes
tasks:
- name: install nodejs + npm dependencies - name: install nodejs + npm dependencies
apt: pkg={{ item }} state=present apt: pkg={{ item }} state=present
with_items: with_items:

1
requirements.yaml Normal file
View File

@ -0,0 +1 @@
- src: git+https://bitbucket.org/dorianpula/ansible-nginx-uwsgi-supervisor