Commit 6f8cf187 by John Jarvis

Merge pull request #498 from edx/jarv/basic-auth-provision

adding option to enable basic auth when we provision
parents 872672aa 6c527c24
......@@ -28,8 +28,9 @@
timeout=15
search_regex="final-message"
roles:
# rerun common to set the hostname
# rerun common to set the hostname, nginx to set basic auth
- common
- nginx
# gh_users hash must be passed
# in as a -e variable
- gh_users
......
......@@ -92,6 +92,15 @@ fi
cd playbooks/edx-east
if [[ $basic_auth == "true" ]]; then
# vars specific to provisioning added to $extra-vars
cat << EOF_AUTH >> $extra_vars
NGINX_HTPASSWD_USER: $auth_user
NGINX_HTPASSWD_PASS: $auth_pass
EOF_AUTH
fi
if [[ $recreate == "true" ]]; then
# vars specific to provisioning added to $extra-vars
cat << EOF >> $extra_vars
......@@ -112,6 +121,7 @@ rabbitmq_refresh: True
GH_USERS_PROMPT: '[$name_tag] '
elb: $elb
EOF
cat $extra_vars
# run the tasks to launch an ec2 instance from AMI
ansible-playbook edx_provision.yml -i inventory.ini -e "@${extra_vars}" --user ubuntu
......
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