From dcabd1a549080fd851b03bf723919ffe4fb875df Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Wed, 7 Jan 2015 08:07:30 -0500 Subject: [PATCH] Remove hosts from tasks, in an attempt to fix issues encountered in the Rookeries project. --- tasks/nginx.yaml | 3 +-- tasks/python.yaml | 23 +++++++++++------------ tasks/supervisor.yaml | 3 +-- tasks/uwsgi.yaml | 3 +-- tasks/web_data_folders.yaml | 3 +-- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/tasks/nginx.yaml b/tasks/nginx.yaml index 0aa2068..d3d5afa 100644 --- a/tasks/nginx.yaml +++ b/tasks/nginx.yaml @@ -1,6 +1,5 @@ --- -- hosts: all - sudo: yes +- sudo: yes vars: rookeries_nginx_conf: rookeries-uwsgi_nginx.conf web_server_group: www-data diff --git a/tasks/python.yaml b/tasks/python.yaml index 8b174da..c09b441 100644 --- a/tasks/python.yaml +++ b/tasks/python.yaml @@ -1,16 +1,15 @@ --- -- hosts: all +- name: install Python setuptools dependencies sudo: yes - tasks: + apt: pkg={{ item }} state=present + with_items: + - python-dev + - python-setuptools - - name: install Python setuptools dependencies - apt: pkg={{ item }} state=present - with_items: - - python-dev - - python-setuptools +- name: bootstrap PIP using setuptools + sudo: yes + easy_install: name=pip - - name: bootstrap PIP using setuptools - easy_install: name=pip - - - name: install Python virtualenv - pip: name=virtualenv +- name: install Python virtualenv + sudo: yes + pip: name=virtualenv diff --git a/tasks/supervisor.yaml b/tasks/supervisor.yaml index 5d1f1b4..53ca245 100644 --- a/tasks/supervisor.yaml +++ b/tasks/supervisor.yaml @@ -1,6 +1,5 @@ --- -- hosts: all - sudo: yes +- sudo: yes vars: web_server_group: www-data supervisor_configs: diff --git a/tasks/uwsgi.yaml b/tasks/uwsgi.yaml index 24770b2..6881ca5 100644 --- a/tasks/uwsgi.yaml +++ b/tasks/uwsgi.yaml @@ -1,6 +1,5 @@ --- -- hosts: all - vars: +- vars: web_server_home: /srv/www web_server_group: www-data uwsgi_venv: "{{ web_server_home }}/virtualenvs/uwsgi" diff --git a/tasks/web_data_folders.yaml b/tasks/web_data_folders.yaml index 39140c6..b7019f9 100644 --- a/tasks/web_data_folders.yaml +++ b/tasks/web_data_folders.yaml @@ -1,6 +1,5 @@ --- -- hosts: all - sudo: yes +- sudo: yes vars: user: "{{ ansible_env.SUDO_USER }}" web_app_home: /srv/www