Use more reliable way to get mysql version
mysqladmin --version displays version of client instead of server one. So we should make decision to run mysql upgrade or not based on the server version. Also this task should be ran only when mariadb is already deployed. This will make possible to be more independent from client version. Change-Id: Icd20b8c81337d37fba219aa6be482b391bdaedde
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
# version. If it is not assume it's nothing is installed.
|
||||
- name: Check mysql version
|
||||
shell: >
|
||||
if which mysqladmin; then
|
||||
mysqladmin --version | grep -w "{{ galera_major_version }}"
|
||||
if which mysql; then
|
||||
mysql -e "SHOW VARIABLES LIKE 'version';" --batch --skip-column-names | grep -w "{{ galera_major_version }}"
|
||||
fi
|
||||
register: mysqladmin_version
|
||||
changed_when: false
|
||||
|
@@ -83,6 +83,7 @@
|
||||
- always
|
||||
|
||||
- include_tasks: galera_upgrade.yml
|
||||
when: galera_deployed | bool
|
||||
tags:
|
||||
- galera_server-upgrade
|
||||
|
||||
|
Reference in New Issue
Block a user