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. # version. If it is not assume it's nothing is installed.
- name: Check mysql version - name: Check mysql version
shell: > shell: >
if which mysqladmin; then if which mysql; then
mysqladmin --version | grep -w "{{ galera_major_version }}" mysql -e "SHOW VARIABLES LIKE 'version';" --batch --skip-column-names | grep -w "{{ galera_major_version }}"
fi fi
register: mysqladmin_version register: mysqladmin_version
changed_when: false changed_when: false

View File

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