redirector play

parent 68be8efc
- name: Deploy redirector host
hosts: all
sudo: True
gather_facts: True
vars:
serial_count: 1
CLUSTER_NAME: 'redirector'
serial: "{{ serial_count }}"
roles:
- aws
- role: nginx
nginx_redirects: "{{ NGINX_REDIRECTOR_CUSTOM_REDIRECTS }}"
REDIRECT_NGINX_PORT: "80"
REDIRECT_SSL_NGINX_PORT: "443"
NGINX_ENABLE_SSL: "{{ REDIRECT_NGINX_ENABLE_SSL }}"
NGINX_SSL_CERTIFICATE: "{{ REDIRECT_NGINX_SSL_CERTIFICATE }}"
NGINX_SSL_KEY: "{{ REDIRECT_NGINX_SSL_KEY }}"
- role: datadog
when: COMMON_ENABLE_DATADOG
- role: splunkforwarder
when: COMMON_ENABLE_SPLUNKFORWARDER
- role: newrelic
when: COMMON_ENABLE_NEWRELIC
......@@ -131,6 +131,9 @@ NGINX_P3P_MESSAGE: 'CP="Open edX does not have a P3P policy."'
COMMON_ENABLE_BASIC_AUTH: False
REDIRECT_NGINX_PORT: "{{ EDXAPP_LMS_NGINX_PORT }}"
REDIRECT_SSL_NGINX_PORT: "{{ EDXAPP_LMS_SSL_NGINX_PORT }}"
CERTS_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
ECOMMERCE_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
EDXAPP_CMS_ENABLE_BASIC_AUTH: "{{ COMMON_ENABLE_BASIC_AUTH }}"
......
......@@ -5,10 +5,10 @@
{%- endif -%}
server {
listen {{ EDXAPP_LMS_NGINX_PORT }} {{ default_site }};
listen {{ REDIRECT_NGINX_PORT }} {{ default_site }};
{% if "ssl" in item.value and item.value['ssl'] == true -%}
listen {{ EDXAPP_LMS_SSL_NGINX_PORT }} {{ default_site }} ssl;
listen {{ REDIRECT_SSL_NGINX_PORT }} {{ default_site }} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
{% endif -%}
......
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