mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-04 05:04:23 -07:00
Fix: mysql auth plugin is set on mariadb >10.2
This commit is contained in:
parent
661ae6f8be
commit
b7b4e2dc71
1 changed files with 37 additions and 7 deletions
|
@ -34,11 +34,16 @@
|
||||||
command: "{{ mysql_command }} -e \"SELECT user, host, plugin FROM mysql.user WHERE user = '{{ test_user_name }}' and host = 'localhost'\""
|
command: "{{ mysql_command }} -e \"SELECT user, host, plugin FROM mysql.user WHERE user = '{{ test_user_name }}' and host = 'localhost'\""
|
||||||
register: show_create_user
|
register: show_create_user
|
||||||
|
|
||||||
- name: Check that the module made a change and that the expected plugin type is set
|
- name: Check that the module made a change
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
|
- name: Check that the expected plugin type is set
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
||||||
|
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.3', '>='))
|
||||||
|
|
||||||
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
||||||
|
|
||||||
|
@ -105,11 +110,16 @@
|
||||||
command: "{{ mysql_command }} -e \"SELECT user, host, plugin FROM mysql.user WHERE user = '{{ test_user_name }}' and host = 'localhost'\""
|
command: "{{ mysql_command }} -e \"SELECT user, host, plugin FROM mysql.user WHERE user = '{{ test_user_name }}' and host = 'localhost'\""
|
||||||
register: show_create_user
|
register: show_create_user
|
||||||
|
|
||||||
- name: Check that the module made a change and that the expected plugin type is set
|
- name: Check that the module made a change
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
|
- name: Check that the expected plugin type is set
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
||||||
|
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.3', '>='))
|
||||||
|
|
||||||
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
||||||
|
|
||||||
|
@ -190,11 +200,16 @@
|
||||||
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
||||||
register: show_create_user
|
register: show_create_user
|
||||||
|
|
||||||
- name: Check that the module made a change and that the expected plugin type is set
|
- name: Check that the module made a change
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
|
- name: Check that the expected plugin type is set
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
||||||
|
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.3', '>='))
|
||||||
|
|
||||||
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
||||||
|
|
||||||
|
@ -275,11 +290,16 @@
|
||||||
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
||||||
register: show_create_user
|
register: show_create_user
|
||||||
|
|
||||||
- name: Check that the module made a change and that the expected plugin type is set
|
- name: Check that the module made a change
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
|
- name: Check that the expected plugin type is set
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
||||||
|
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.3', '>='))
|
||||||
|
|
||||||
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
||||||
|
|
||||||
|
@ -354,11 +374,16 @@
|
||||||
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
||||||
register: show_create_user
|
register: show_create_user
|
||||||
|
|
||||||
- name: Check that the module made a change and that the expected plugin type is set
|
- name: Check that the module made a change
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
|
|
||||||
|
- name: Check that the expected plugin type is set
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
- "'{{ test_plugin_type }}' in show_create_user.stdout"
|
||||||
|
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.3', '>='))
|
||||||
|
|
||||||
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
||||||
|
|
||||||
|
@ -374,11 +399,16 @@
|
||||||
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
command: "{{ mysql_command }} -e \"SHOW CREATE USER '{{ test_user_name }}'@'localhost'\""
|
||||||
register: show_create_user
|
register: show_create_user
|
||||||
|
|
||||||
- name: Check that the module made a change and that the expected plugin type is set
|
- name: Check that the module made a change
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "result.changed == true"
|
- "result.changed == true"
|
||||||
- "'sha256_password' in show_create_user.stdout"
|
|
||||||
|
- name: Check that the expected plugin type is set
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "'sha256_password' in show_create_user.stdout"
|
||||||
|
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.3', '>='))
|
||||||
|
|
||||||
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
- include: assert_user.yml user_name={{ test_user_name }} priv={{ test_default_priv_type }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue