Commit 4636dd46 by Jason Bau

Add site-specific parameterization for nginx config

parent 9df482f7
---
app_base_dir: /opt/wwc
# this path is relative to the playbook dir
secure_dir: 'secure_example'
venv_dir: /opt/edx
# these pathes are relative to the playbook dir
# directory for secret settings (keys, etc)
secure_dir: 'secure_example'
# this indicates the path to site-specific (with precedence)
# things like nginx template files
local_dir: '../../ansible_local'
\ No newline at end of file
......@@ -2,7 +2,11 @@
---
- name: Copying nginx config {{ site_name }}
sudo: True
template: src={{ site_name }}.j2 dest=/etc/nginx/sites-available/{{ site_name }}
template: src={{ item }} dest=/etc/nginx/sites-available/{{ site_name }}
first_available_file:
- "{{ local_dir }}/nginx/templates/{{ site_name }}.j2"
# seems like paths in first_available_file must be relative to the playbooks dir
- "roles/nginx/templates/{{ site_name }}.j2"
notify: restart nginx
tags:
- nginx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment