Merge "Use more reliable way to get mysql version"

This commit is contained in:
Zuul 2020-05-06 18:22:54 +00:00 committed by Gerrit Code Review
commit 67c0a5437d
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -83,6 +83,7 @@
- always
- include_tasks: galera_upgrade.yml
when: galera_deployed | bool
tags:
- galera_server-upgrade