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:
parent
41a54c74e4
commit
a634aac67f
|
@ -1,10 +1,17 @@
|
|||
---
|
||||
- include: pre_deployment/base_linux.yaml
|
||||
- include: pre_deployment/python.yaml
|
||||
- include: pre_deployment/mysql_db.yaml
|
||||
- include: pre_deployment/nginx.yaml
|
||||
- include: pre_deployment/supervisor.yaml
|
||||
- include: pre_deployment/web_data_folders.yaml
|
||||
- include: pre_deployment/nodejs.yaml
|
||||
- hosts: all
|
||||
sudo: yes
|
||||
|
||||
roles:
|
||||
- ansible-nginx-uwsgi-supervisor
|
||||
tasks:
|
||||
- include: pre_deployment/base_linux.yaml
|
||||
- include: pre_deployment/mysql_db.yaml
|
||||
vars:
|
||||
databases:
|
||||
rookeries:
|
||||
username: rookeries
|
||||
password: system_admin
|
||||
- include: pre_deployment/nodejs.yaml
|
||||
|
||||
# TODO Add in globally defined values for webapp and virtualenv folders
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
---
|
||||
- hosts: all
|
||||
sudo: yes
|
||||
tasks:
|
||||
|
||||
- name: install vim
|
||||
- name: install vim
|
||||
apt: pkg=vim state=present
|
||||
|
||||
- name: configure vim
|
||||
- name: configure vim
|
||||
copy: src=../config/base/_vimrc dest=/home/vagrant/.vimrc
|
||||
|
|
|
@ -1,23 +1,14 @@
|
|||
---
|
||||
- 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
|
||||
with_items:
|
||||
- mysql-server
|
||||
- python-mysqldb
|
||||
|
||||
- name: setup MySQL databases for rookeries.
|
||||
- name: setup MySQL databases for rookeries.
|
||||
mysql_db: name={{ item.key }} state=present
|
||||
with_dict: databases
|
||||
|
||||
- name: add MySQL database users for rookeries.
|
||||
- name: add MySQL database users for rookeries.
|
||||
mysql_user: name={{ item.value.username }} password={{ item.value.password }} priv={{ item.key }}:ALL
|
||||
with_dict: databases
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
---
|
||||
- hosts: all
|
||||
sudo: yes
|
||||
tasks:
|
||||
|
||||
- name: install nodejs + npm dependencies
|
||||
- name: install nodejs + npm dependencies
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- nodejs
|
||||
- npm
|
||||
|
||||
- name: link nodejs binary correctly
|
||||
- name: link nodejs binary correctly
|
||||
file: src=/usr/bin/nodejs dest=/usr/bin/node state=link
|
||||
|
||||
- name: install coffeescript + less dependencies
|
||||
- name: install coffeescript + less dependencies
|
||||
npm: name={{ item }} global=yes state=present
|
||||
with_items:
|
||||
- coffee-script
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
- src: git+https://bitbucket.org/dorianpula/ansible-nginx-uwsgi-supervisor
|
Loading…
Reference in New Issue