Remove Ansible playbooks converted into UWSGI/NGINX role.

This commit is contained in:
Dorian 2015-01-09 07:51:00 -05:00
parent a634aac67f
commit 013aa699f5
5 changed files with 0 additions and 122 deletions

View File

@ -13,5 +13,3 @@
username: rookeries username: rookeries
password: system_admin password: system_admin
- include: pre_deployment/nodejs.yaml - include: pre_deployment/nodejs.yaml
# TODO Add in globally defined values for webapp and virtualenv folders

View File

@ -1,40 +0,0 @@
---
- hosts: all
sudo: yes
vars:
rookeries_nginx_conf: rookeries-uwsgi_nginx.conf
web_server_group: www-data
tasks:
- name: install nginx webserver
apt: pkg=nginx-full state=present
- name: configure nginx
copy: src=../config/nginx/{{ rookeries_nginx_conf }} dest=/etc/nginx/sites-available
- name: enable the rookeries nginx configuration
file: state=link
src=/etc/nginx/sites-available/{{ rookeries_nginx_conf }}
path=/etc/nginx/sites-enabled/{{ rookeries_nginx_conf }}
- name: disable the default page configuration
file: state=absent path=/etc/nginx/sites-enabled/default
- name: restart nginx
service: name=nginx state=restarted
- name: set permissions on nginx config + log directories
file: path={{ item }} state=directory
group={{ web_server_group }} mode=0755
with_items:
- /var/log/nginx
- /etc/nginx
- /etc/nginx/sites-available
- /etc/nginx/sites-enabled
- name: set permissions on nginx logs
file: path=/var/log/nginx/{{ item }} state=file
owner={{ web_server_group }} group={{ web_server_group }} mode=0644
with_items:
- access.log
- error.log

View File

@ -1,16 +0,0 @@
---
- hosts: all
sudo: yes
tasks:
- name: install Python setuptools dependencies
apt: pkg={{ item }} state=present
with_items:
- python-dev
- python-setuptools
- name: bootstrap PIP using setuptools
easy_install: name=pip
- name: install Python virtualenv
pip: name=virtualenv

View File

@ -1,30 +0,0 @@
---
- hosts: all
sudo: yes
vars:
web_server_group: www-data
supervisor_configs:
- mailsink_supervisor.conf
- rookeries_supervisor.conf
tasks:
- name: install supervisord
apt: name=supervisor state=present
- name: set permissions on supervisor config and log directories
file: path={{ item }} group={{ web_server_group }} state=directory mode=0755
with_items:
- /etc/supervisor
- /etc/supervisor/conf.d
- /var/log/supervisor
- name: modify supervisor configuration
ini_file: dest=/etc/supervisor/supervisord.conf section=unix_http_server
option={{ item.key }} value={{ item.value }}
with_dict:
chmod: "0770"
chown: root:www-data
- name: upload rookeries supervisor configuration to web server home
copy: src=../config/supervisor/{{ item }} dest=/etc/supervisor/conf.d
with_items: supervisor_configs

View File

@ -1,34 +0,0 @@
---
- hosts: all
sudo: yes
vars:
user: "{{ ansible_env.SUDO_USER }}"
web_app_home: /srv/www
web_server_group: www-data
tasks:
- name: setup webapp deployment folder with the correct permissions
file: path={{ web_app_home }} state=directory owner={{ web_server_group }} group=www-data mode=0774
- name: setup webapp deployment configuration + log folders with the correct permissions
file: path={{ web_app_home }}/{{ item }} state=directory
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
with_items:
- config
- config/uwsgi
- logs
- virtualenvs
- name: setup webapp deployment configuration + log folders with the correct permissions
file: state=link
path={{ web_app_home }}/{{ item.value }}
src={{ item.key }}
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
with_dict:
/etc/nginx: config/nginx
/etc/supervisor: config/supervisor
/var/log/nginx: logs/nginx
/var/log/supervisor: logs/supervisor
- name: add user to www-data
user: name={{ user }} append=yes groups={{ web_server_group }}