Skip to content
Snippets Groups Projects
Commit 8cfbb38d authored by Jupiter Hu's avatar Jupiter Hu
Browse files

Fixed karaage db initial check and initialization

parent 94a9d32b
No related branches found
No related tags found
No related merge requests found
...@@ -139,11 +139,8 @@ ...@@ -139,11 +139,8 @@
sudo: true sudo: true
- -
# TODO: Fix it name: "Check karaage DB has been initialized or not"
name: "Check DB tables has been created or not" shell: mysql -h {{ karaageDbHost }} -u {{ karaageDbName }} --password={{ mysql_user_password }} -Bse 'use karaage; show tables;' | wc -l
shell: ls /root/.karaage_db_init
ignore_errors: true
sudo: true
register: karaage_db_init register: karaage_db_init
- -
...@@ -158,9 +155,9 @@ ...@@ -158,9 +155,9 @@
- -
name: " Create DB tables" name: " Create DB tables"
shell: kg-manage migrate && touch /root/.karaage_db_init shell: kg-manage migrate
sudo: true sudo: true
when: karaage_db_init is not defined when: karaage_db_init.stdout.find("0") == 0
- -
name: "Restarting Celery" name: "Restarting Celery"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment