Reorganize configurations for playbook.
Break up playbooks into simpler modular playbooks.
This commit is contained in:
commit
0b291af9e7
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# TODO Include all necessary deployment playbooks
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# TODO PIP install mailsink into a virtualenv somewhere
|
||||||
|
- name: Install fake SMTP server for email development.
|
||||||
|
pip: name=mailsink use_mirrors=no
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# TODO Step 1 - Setup virtualenv in target
|
||||||
|
# TODO Step 2 - Copy over package to target system
|
||||||
|
# TODO Step 3 - PIP install into virtualenv
|
||||||
|
# TODO Step 4 - Setup environment variables on target system related to config.
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# TODO Step 1 - PIP install uwsgi into virtualenv
|
||||||
|
# TODO Step 2 - Start uwsgi with the given configs.
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# TODO Include all necessary playbooks
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Install vim
|
||||||
|
apt: pkg=vim update_cache=yes state=present
|
||||||
|
|
||||||
|
- name: Configure vim
|
||||||
|
copy: src=config/base/_vimrc dest=/home/vagrant/.vimrc
|
||||||
|
|
||||||
|
# TODO Add update of apt cache + any extra repo setup here.
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# Setup MySQL dependencies.
|
||||||
|
# TODO Extract all variables into an easy to configure file.
|
||||||
|
- name: Install MySQL 5x server
|
||||||
|
apt: pkg=mysql-server update_cache=no state=present
|
||||||
|
|
||||||
|
- name: Install mysqldb is installed.
|
||||||
|
apt: pkg=python-mysqldb update_cache=no state=present
|
||||||
|
|
||||||
|
- name: Setup MySQL database for rookeries.
|
||||||
|
mysql_db: name=rookeries state=present
|
||||||
|
|
||||||
|
- name: Setup MySQL database user for rookeries.
|
||||||
|
mysql_user: name=rookeries password=system_admin priv=rookeries:ALL
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# Next setup our webserver.
|
||||||
|
# TODO Extract variables into a single easy to configure place.
|
||||||
|
- name: Install nginx
|
||||||
|
apt: pkg=nginx-full update_cache=yes state=present
|
||||||
|
|
||||||
|
- name: Configure nginx
|
||||||
|
copy: src=config/nginx/rookeries-uwsgi.conf dest=/etc/nginx/sites-available
|
||||||
|
|
||||||
|
- name: Link the rookeries uwsgi file
|
||||||
|
file: state=link
|
||||||
|
src=/etc/nginx/sites-available/rookeries-uwsgi.conf
|
||||||
|
path=/etc/nginx/sites-enabled/rookeries-uwsgi.conf
|
||||||
|
|
||||||
|
- name: Unlink the default page
|
||||||
|
file: state=absent path=/etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
|
- name: Run nginx service
|
||||||
|
command: service nginx restart
|
||||||
|
|
||||||
|
- name: Setup webapp deployment folder with the correct permissions
|
||||||
|
file: path=/var/www state=directory owner=vagrant group=www-data mode=0774
|
||||||
|
|
||||||
|
- name: Add vagrant user to www-data
|
||||||
|
user: name=vagrant append=yes groups=www-data
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# TODO Install nodejs + coffeescript dependencies
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
sudo: yes
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# Setup Python dependencies.
|
||||||
|
- name: Python Development
|
||||||
|
apt: pkg=python-dev update_cache=no state=present
|
||||||
|
|
||||||
|
- name: Bootstrap Python SetupTools
|
||||||
|
apt: pkg=python-setuptools update_cache=no state=present
|
||||||
|
|
||||||
|
- name: Bootstrap PIP using Setuptools
|
||||||
|
easy_install: pkg=pip state=present
|
||||||
|
|
||||||
|
- name: Install Python virtualenvwrapper
|
||||||
|
pip: name=virtualenvwrapper use_mirrors=no
|
||||||
|
|
||||||
|
- name: Configure Bash to use virtualenvwrapper
|
||||||
|
lineinfile: dest=/home/vagrant/.bashrc line="source virtualenvwrapper.sh"
|
Loading…
Reference in New Issue