Commit f0502ea3 by Kevin Falcone
parent 1c434735
...@@ -4,20 +4,7 @@ ...@@ -4,20 +4,7 @@
gather_facts: False gather_facts: False
vars: vars:
db_dry_run: "--list" db_dry_run: "--list"
syncdb: false
tasks: tasks:
- name: syncdb
shell: >
chdir={{ edxapp_code_dir }}
python manage.py {{ item }} syncdb --noinput --settings=aws_migrate
environment:
DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}"
DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
when: syncdb
with_items:
- lms
- cms
# Syncdb with migrate when the migrate user is overridden in extra vars
- name: migrate - name: migrate
shell: > shell: >
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
......
...@@ -41,19 +41,12 @@ if [[ -f ${WORKSPACE}/configuration-secure/ansible/vars/${deployment}.yml ]]; th ...@@ -41,19 +41,12 @@ if [[ -f ${WORKSPACE}/configuration-secure/ansible/vars/${deployment}.yml ]]; th
extra_var_args+=" -e@${WORKSPACE}/configuration-secure/ansible/vars/${deployment}.yml" extra_var_args+=" -e@${WORKSPACE}/configuration-secure/ansible/vars/${deployment}.yml"
fi fi
if [[ -z $syncdb ]]; then
syncdb="false"
fi
if [[ $db_dry_run == "false" ]]; then if [[ $db_dry_run == "false" ]]; then
# Set this to an empty string if db_dry_run is # Set this to an empty string if db_dry_run is
# not set. By default the db_dry_run var is # not set. By default the db_dry_run var is
# set to --list # set to --list
extra_var_args+=" -e db_dry_run=''" extra_var_args+=" -e db_dry_run=''"
else
# always skip syncdb unless dry run is unchecked
syncdb="false"
fi fi
if [[ -f ${WORKSPACE}/configuration-secure/ansible/vars/${environment}-${deployment}.yml ]]; then if [[ -f ${WORKSPACE}/configuration-secure/ansible/vars/${environment}-${deployment}.yml ]]; then
...@@ -67,7 +60,6 @@ done ...@@ -67,7 +60,6 @@ done
extra_var_args+=" -e edxapp_app_dir=${WORKSPACE}" extra_var_args+=" -e edxapp_app_dir=${WORKSPACE}"
extra_var_args+=" -e edxapp_code_dir=${WORKSPACE}/edx-platform" extra_var_args+=" -e edxapp_code_dir=${WORKSPACE}/edx-platform"
extra_var_args+=" -e edxapp_user=jenkins" extra_var_args+=" -e edxapp_user=jenkins"
extra_var_args+=" -e syncdb=$syncdb"
extra_var_args+=" -e EDXAPP_CFG_DIR=${WORKSPACE}" extra_var_args+=" -e EDXAPP_CFG_DIR=${WORKSPACE}"
# Generate the json configuration files # Generate the json configuration files
......
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