Commit 3b25d186 by Kevin Falcone

Allow for an additional layer of configuration repository

parent 8257d6fe
...@@ -86,13 +86,14 @@ if [[ ( -z $AWS_ACCESS_KEY_ID || -z $AWS_SECRET_ACCESS_KEY ) && (! -f $BOTO_CONF ...@@ -86,13 +86,14 @@ if [[ ( -z $AWS_ACCESS_KEY_ID || -z $AWS_SECRET_ACCESS_KEY ) && (! -f $BOTO_CONF
fi fi
extra_vars_file="/var/tmp/extra-vars-$$.yml" extra_vars_file="/var/tmp/extra-vars-$$.yml"
sandbox_vars_file="${WORKSPACE}/configuration-secure/ansible/vars/developer-sandbox.yml" sandbox_secure_vars_file="${WORKSPACE}/configuration-secure/ansible/vars/developer-sandbox.yml"
sandbox_internal_vars_file="${WORKSPACE}/configuration-internal/ansible/vars/developer-sandbox.yml"
extra_var_arg="-e@${extra_vars_file}" extra_var_arg="-e@${extra_vars_file}"
if [[ $edx_internal == "true" ]]; then if [[ $edx_internal == "true" ]]; then
# if this is a an edx server include # if this is a an edx server include
# the secret var file # the secret var file
extra_var_arg="-e@${sandbox_vars_file} -e@${extra_vars_file}" extra_var_arg="-e@${sandbox_internal_vars_file} -e@${sandbox_secure_vars_file} -e@${extra_vars_file}"
fi fi
if [[ -z $region ]]; then if [[ -z $region ]]; then
...@@ -376,7 +377,7 @@ fi ...@@ -376,7 +377,7 @@ fi
# deploy the edx_ansible role # deploy the edx_ansible role
run_ansible edx_ansible.yml -i "${deploy_host}," $extra_var_arg --user ubuntu run_ansible edx_ansible.yml -i "${deploy_host}," $extra_var_arg --user ubuntu
cat $sandbox_vars_file $extra_vars_file | grep -v -E "_version|migrate_db" > ${extra_vars_file}_clean cat $sandbox_secure_vars_file $sandbox_internal_vars_file $extra_vars_file | grep -v -E "_version|migrate_db" > ${extra_vars_file}_clean
ansible -c ssh -i "${deploy_host}," $deploy_host -m copy -a "src=${extra_vars_file}_clean dest=/edx/app/edx_ansible/server-vars.yml" -u ubuntu -b ansible -c ssh -i "${deploy_host}," $deploy_host -m copy -a "src=${extra_vars_file}_clean dest=/edx/app/edx_ansible/server-vars.yml" -u ubuntu -b
ret=$? ret=$?
if [[ $ret -ne 0 ]]; then if [[ $ret -ne 0 ]]; then
......
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