Commit ff6039cd by Bilal Ahmad

Merge pull request #2873 from edx/OPS-952

Adding support for multiple auth credentials for nginx (OPS-952)
parents 1a1172ff 0012d4c3
......@@ -10,6 +10,12 @@ NGINX_EDXAPP_EXTRA_SITES: []
NGINX_EDXAPP_EXTRA_CONFIGS: []
NGINX_EDXAPP_CUSTOM_REDIRECTS: {}
# Override these vars for adding user to nginx.htpasswd
NGINXUSERS:
- name: "{{ COMMON_HTPASSWD_USER }}"
password: "{{ COMMON_HTPASSWD_PASS }}"
state: present
NGINX_ENABLE_SSL: False
NGINX_REDIRECT_TO_HTTPS: False
# Set these to real paths on your
......
......@@ -223,13 +223,15 @@
- name: Write out htpasswd file
htpasswd: >
name={{ COMMON_HTPASSWD_USER }}
password={{ COMMON_HTPASSWD_PASS }}
name={{ item.name }}
password={{ item.password }}
state={{ item.state }}
path={{ nginx_htpasswd_file }}
when: COMMON_ENABLE_BASIC_AUTH
tags:
- install
- install:configuration
with_items: NGINXUSERS
- name: Create nginx log file location (just in case)
file: >
......
......@@ -268,6 +268,8 @@ SANDBOX_USERNAME: $github_username
EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT: "https://ecommerce-${deploy_host}"
EDXAPP_ECOMMERCE_API_URL: "https://ecommerce-${deploy_host}/api/v2"
NGINXUSERS: $nginx_users
ECOMMERCE_ECOMMERCE_URL_ROOT: "https://ecommerce-${deploy_host}"
ECOMMERCE_LMS_URL_ROOT: "https://${deploy_host}"
ECOMMERCE_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true
......
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