File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 4646
4747 - name : Create MySQL database
4848 command : >
49- mysql -h "{{ db_host }}" -u "{{ db_user }}" -p' {{ db_pass }}'
49+ mysql -h "{{ db_host }}" -u "{{ db_user }}" -p " {{ db_pass }}"
5050 -e "CREATE DATABASE IF NOT EXISTS {{ db_name }}"
5151 no_log : true
5252 register : create_db
53- changed_when : " 'already exists' not in create_db.stderr
53+ changed_when : " 'already exists' not in create_db.stderr"
5454
5555 - name : Load MySQL initialization script (run once)
5656 run_once : true
6161 changed_when : false
6262 register : db_load_result
6363
64-
6564 - name : Verify database initialization
6665 run_once : true
6766 shell : |
7069 changed_when : false
7170 when : db_load_result.rc == 0
7271
73-
7472 - name : Fail if database initialization failed
7573 run_once : true
7674 fail :
7775 msg : " Database initialization failed with exit code {{ db_load_result.rc }}. Check the SQL script for errors."
78- when : db_load_result.rc != 0 or db_check is skipped
76+ when : db_load_result.rc != 0 or db_check is skipped
You can’t perform that action at this time.
0 commit comments