From 013aa699f58c36e0913b080a2998a0f1d72f6073 Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Fri, 9 Jan 2015 07:51:00 -0500 Subject: [PATCH] Remove Ansible playbooks converted into UWSGI/NGINX role. --- pre_deployment.yaml | 2 -- pre_deployment/nginx.yaml | 40 ---------------------------- pre_deployment/python.yaml | 16 ----------- pre_deployment/supervisor.yaml | 30 --------------------- pre_deployment/web_data_folders.yaml | 34 ----------------------- 5 files changed, 122 deletions(-) delete mode 100644 pre_deployment/nginx.yaml delete mode 100644 pre_deployment/python.yaml delete mode 100644 pre_deployment/supervisor.yaml delete mode 100644 pre_deployment/web_data_folders.yaml diff --git a/pre_deployment.yaml b/pre_deployment.yaml index 4dac7b6..5fa3b3f 100644 --- a/pre_deployment.yaml +++ b/pre_deployment.yaml @@ -13,5 +13,3 @@ username: rookeries password: system_admin - include: pre_deployment/nodejs.yaml - -# TODO Add in globally defined values for webapp and virtualenv folders diff --git a/pre_deployment/nginx.yaml b/pre_deployment/nginx.yaml deleted file mode 100644 index 0aa2068..0000000 --- a/pre_deployment/nginx.yaml +++ /dev/null @@ -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 diff --git a/pre_deployment/python.yaml b/pre_deployment/python.yaml deleted file mode 100644 index 8b174da..0000000 --- a/pre_deployment/python.yaml +++ /dev/null @@ -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 diff --git a/pre_deployment/supervisor.yaml b/pre_deployment/supervisor.yaml deleted file mode 100644 index 5d1f1b4..0000000 --- a/pre_deployment/supervisor.yaml +++ /dev/null @@ -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 diff --git a/pre_deployment/web_data_folders.yaml b/pre_deployment/web_data_folders.yaml deleted file mode 100644 index 39140c6..0000000 --- a/pre_deployment/web_data_folders.yaml +++ /dev/null @@ -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 }}