From 4adc1419339f8f68e43a8c87794690a9b0a99d06 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sun, 8 Jan 2017 18:33:49 -0800 Subject: [PATCH] Bugfixes --- ch08/playbooks/roles/mezzanine/tasks/django.yml | 3 ++- ch08/playbooks/roles/mezzanine/tasks/main.yml | 2 +- ch08/playbooks/roles/mezzanine/vars/main.yml | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ch08/playbooks/roles/mezzanine/tasks/django.yml b/ch08/playbooks/roles/mezzanine/tasks/django.yml index 61eea8e..8a0c685 100644 --- a/ch08/playbooks/roles/mezzanine/tasks/django.yml +++ b/ch08/playbooks/roles/mezzanine/tasks/django.yml @@ -8,6 +8,7 @@ - pip - virtualenv - virtualenvwrapper + become: True - name: install required python packages pip: name={{ item }} virtualenv={{ mezzanine_venv_path }} with_items: @@ -21,7 +22,7 @@ requirements={{ mezzanine_proj_path }}/{{ mezzanine_reqs_path }} virtualenv={{ mezzanine_venv_path }} - name: generate the settings file - template: src=local_settings.py.j2 dest={{ mezzanine_proj_path }}/local_settings.py + template: src=local_settings.py.j2 dest={{ mezzanine_settings_path }}/local_settings.py - name: apply migrations to create the database, collect static content django_manage: command: "{{ item }}" diff --git a/ch08/playbooks/roles/mezzanine/tasks/main.yml b/ch08/playbooks/roles/mezzanine/tasks/main.yml index 0f3fa57..975a15e 100644 --- a/ch08/playbooks/roles/mezzanine/tasks/main.yml +++ b/ch08/playbooks/roles/mezzanine/tasks/main.yml @@ -7,7 +7,7 @@ - libjpeg-dev - libpq-dev - memcached - - postgresql + - nginx - python-dev - python-pip - python-psycopg2 diff --git a/ch08/playbooks/roles/mezzanine/vars/main.yml b/ch08/playbooks/roles/mezzanine/vars/main.yml index f530907..24c0bc6 100644 --- a/ch08/playbooks/roles/mezzanine/vars/main.yml +++ b/ch08/playbooks/roles/mezzanine/vars/main.yml @@ -2,9 +2,10 @@ # vars file for mezzanine mezzanine_user: "{{ ansible_user }}" mezzanine_venv_home: "{{ ansible_env.HOME }}/.virtualenvs" -mezzanine_venv_path: "{{ venv_home }}/{{ proj_name }}" +mezzanine_venv_path: "{{ mezzanine_venv_home }}/{{ mezzanine_proj_name }}" mezzanine_repo_url: git@github.com:ansiblebook/mezzanine_example.git -mezzanine_proj_path: "{{ ansible_env.HOME }}/mezzanine/{{ mwzzanine_proj_name }}" +mezzanine_proj_path: "{{ ansible_env.HOME }}/mezzanine/{{ mezzanine_proj_name }}" +mezzanine_settings_path: "{{ mezzanine_proj_path }}/{{ mezzanine_proj_name }}" mezzanine_reqs_path: requirements.txt mezzanine_conf_path: /etc/nginx/conf mezzanine_python: "{{ mezzanine_venv_path }}/bin/python" -- 2.44.0