Replace ansible_env.HOME with ansible_root_dir
authorLorin Hochstein <lhochstein@netflix.com>
Mon, 16 Jan 2017 01:57:46 +0000 (17:57 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Mon, 16 Jan 2017 01:57:46 +0000 (17:57 -0800)
ch13/ansible/container.yml
ch13/ansible/roles/mezzanine/tasks/django.yml
ch13/ansible/roles/mezzanine/vars/main.yml

index 0275ccf..c398f65 100644 (file)
@@ -9,6 +9,7 @@ defaults:
   twitter_access_token_secret: 1974cf8419114bdd9d4ea3db7a210d90
   twitter_consumer_key: 1f1c627530b34bb58701ac81ac3fad51
   twitter_consumer_secret: 36515c2b60ee4ffb9d33d972a7ec350a
+  mezzanine_root_dir: /srv
   mezzanine_proj_app: mezzanine_example
   mezzanine_proj_name: "{{ mezzanine_proj_app }}"
   locale: en_US.UTF-8
index 97bfa2b..7e8b1c1 100644 (file)
@@ -1,5 +1,5 @@
 - name: create a logs directory
-  file: path="{{ ansible_env.HOME }}/logs" state=directory
+  file: path="{{ mezzanine_root_dir }}/logs" state=directory
 - name: check out the repository on the host
   git: repo={{ mezzanine_repo_url }} dest={{ mezzanine_proj_path }} accept_hostkey=yes
 - name: install Python requirements globally via pip
index 24c0bc6..5037c0f 100644 (file)
@@ -1,10 +1,10 @@
 ---
 # vars file for mezzanine
 mezzanine_user: "{{ ansible_user }}"
-mezzanine_venv_home: "{{ ansible_env.HOME }}/.virtualenvs"
+mezzanine_venv_home: "{{ mezzanine_root_dir }}/.virtualenvs"
 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/{{ mezzanine_proj_name }}"
+mezzanine_proj_path: "{{ mezzanine_root_dir }}/mezzanine/{{ mezzanine_proj_name }}"
 mezzanine_settings_path: "{{ mezzanine_proj_path }}/{{ mezzanine_proj_name }}"
 mezzanine_reqs_path: requirements.txt
 mezzanine_conf_path: /etc/nginx/conf