Commit e58b3a65 by Jason Bau

make the run_migration flags more prompt friendly

parent fd064662
# this gets all running prod webservers
#- hosts: tag_environment_prod:&tag_function_webserver
# or we can get subsets of them by name
- hosts: ~tag_Name_app(4)_prod
- hosts: ~tag_Name_app(11|21)_prod
#- hosts: ~tag_Name_app(11|21)_prod
## these are cold hosts:
#- hosts: ~tag_Name_app(12|22)_prod
......@@ -10,6 +10,15 @@
## you can also do security group, but don't do that
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True
vars_prompt:
- name: "lms_version"
prompt: "Enter the edx-platform version: branch, hash, tag, or 'HEAD' (default is edx-west/release)"
default: "edx-west/release"
private: no
- name: "migrate_db"
prompt: "Should this playbook run database migrations? (Default is False)"
default: false
private: no
vars:
secure_dir: '../../../configuration-secure/ansible'
# this indicates the path to site-specific (with precedence)
......
# this gets all running prod webservers
- hosts: tag_environment_prod:&tag_function_ora
#- hosts: tag_environment_prod:&tag_function_ora
# or we can get subsets of them by name
#- hosts: ~tag_Name_xserver(1|2)_prod
- hosts: ~tag_Name_ora(10|11)_prod
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True
vars:
......
......@@ -261,7 +261,7 @@
- name: syncdb and migrate
shell: sudo -u www-data SERVICE_VARIANT=lms /opt/edx/bin/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath=/opt/wwc/edx-platform
when: migrate_db is defined
when: migrate_db
tags:
- deploy
- lms
......
......@@ -93,7 +93,7 @@
- name: syncdb and migrate
shell: sudo -u www-data {{venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
when: migrate_db is defined
when: migrate_db
tags:
- ora
- syncdb
......
......@@ -47,7 +47,7 @@
- name: syncdb and migrate
shell: sudo -u www-data /opt/edx/bin/django-admin.py syncdb --migrate --noinput --settings=xqueue.aws_settings --pythonpath=/opt/wwc/xqueue
when: migrate_db is defined
when: migrate_db
tags:
- xqueue
- syncdb
......
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