Commit c14c8454 by Xavier Antoviaque

sandbox-ora: Allow to deactivate creation of the xqueue DB

The mysql_db command from ansible expects to be able to connect to the
`mysql` DB, which prevents changing the MySQL DB for xqueue to a
DB on which we don't have overall administrator privileges.

https://github.com/ansible/ansible/blob/devel/library/database/mysql_db
parent c8534589
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
login_password={{xqueue_auth_config.DATABASES.default.PASSWORD}} login_password={{xqueue_auth_config.DATABASES.default.PASSWORD}}
state=present state=present
encoding=utf8 encoding=utf8
when: xqueue_create_db is defined and xqueue_create_db|lower == "yes"
- name: xqueue | create xqueue application config - name: xqueue | create xqueue application config
template: src=xqueue.env.json.j2 dest={{app_base_dir}}/xqueue.env.json mode=0640 owner={{ xqueue_user }} group=adm template: src=xqueue.env.json.j2 dest={{app_base_dir}}/xqueue.env.json mode=0640 owner={{ xqueue_user }} group=adm
......
...@@ -39,6 +39,7 @@ xqueue_auth_config: ...@@ -39,6 +39,7 @@ xqueue_auth_config:
'DATABASES': 'DATABASES':
'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'xqueue', 'USER': 'root', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306' } 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'xqueue', 'USER': 'root', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306' }
xqueue_create_db: 'yes'
xqueue_source_repo: https://github.com/edx/xqueue.git xqueue_source_repo: https://github.com/edx/xqueue.git
xqueue_version: 'HEAD' xqueue_version: 'HEAD'
xqueue_pre_requirements_file: "{{ xqueue_code_dir }}/pre-requirements.txt" xqueue_pre_requirements_file: "{{ xqueue_code_dir }}/pre-requirements.txt"
......
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