mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-06 10:40:36 -07:00
Fix conditionals to accomodate for MySQL v8
This commit is contained in:
parent
5b5fe8e628
commit
4b4c06b4f7
1 changed files with 5 additions and 3 deletions
|
@ -179,6 +179,7 @@
|
|||
- name: set old database separator
|
||||
set_fact:
|
||||
separator: '\n'
|
||||
# Semantically: when mysql version <= 5.6 or MariaDB version <= 10.1
|
||||
when: db_version.version.major <= 5 and db_version.version.minor <= 6 or db_version.version.major == 10 and db_version.version.minor < 2
|
||||
|
||||
- block:
|
||||
|
@ -190,7 +191,8 @@
|
|||
- name: set new database separator
|
||||
set_fact:
|
||||
separator: 'PASSWORD'
|
||||
when: db_version.version.major >= 5 and db_version.version.major < 10 and db_version.version.minor > 6 or db_version.version.major == 10 and db_version.version.minor >= 2
|
||||
# Semantically: when mysql version >= 5.7 or MariaDB version >= 10.2
|
||||
when: db_version.version.major = 5 and db_version.version.minor >= 7 or db_version.version.major > 5 and db_version.version.major < 10 or db_version.version.major == 10 and db_version.version.minor >= 2
|
||||
|
||||
- block:
|
||||
- name: assert user1 TLS requirements
|
||||
|
@ -241,7 +243,7 @@
|
|||
- name: retrieve TLS requiremets for users in new database version
|
||||
command: "{{ mysql_command }} -L -N -s -e \"SHOW CREATE USER '{{ user_name_1 }}'@'localhost'\""
|
||||
register: new_result
|
||||
when: db_version.version.major >= 5 and db_version.version.major < 10 and db_version.version.minor > 6 or db_version.version.major == 10 and db_version.version.minor >= 2
|
||||
when: db_version.version.major = 5 and db_version.version.minor >= 7 or db_version.version.major > 5 and db_version.version.major < 10 or db_version.version.major == 10 and db_version.version.minor >= 2
|
||||
|
||||
- name: assert user1 TLS requirements was not changed
|
||||
assert:
|
||||
|
@ -265,7 +267,7 @@
|
|||
- name: retrieve TLS requiremets for users in new database version
|
||||
command: "{{ mysql_command }} -L -N -s -e \"SHOW CREATE USER '{{ user_name_1 }}'@'localhost'\""
|
||||
register: new_result
|
||||
when: db_version.version.major >= 5 and db_version.version.major < 10 and db_version.version.minor > 6 or db_version.version.major == 10 and db_version.version.minor >= 2
|
||||
when: db_version.version.major = 5 and db_version.version.minor >= 7 or db_version.version.major > 5 and db_version.version.major < 10 or db_version.version.major == 10 and db_version.version.minor >= 2
|
||||
|
||||
- name: assert user1 TLS requirements
|
||||
assert:
|
||||
|
|
Loading…
Add table
Reference in a new issue