Add one more check

This commit is contained in:
Fran Sanjuán 2024-08-23 16:58:06 +02:00
commit 3325643438

View file

@ -579,6 +579,7 @@
host: '%' host: '%'
plugin: caching_sha2_password plugin: caching_sha2_password
plugin_hash_string: '{{ test_plugin_hash }}' plugin_hash_string: '{{ test_plugin_hash }}'
salt: '{{ test_salt }}'
priv: '{{ test_default_priv }}' priv: '{{ test_default_priv }}'
check_mode: true check_mode: true
register: result register: result
@ -597,6 +598,7 @@
host: '%' host: '%'
plugin: caching_sha2_password plugin: caching_sha2_password
plugin_hash_string: '{{ test_plugin_hash }}' plugin_hash_string: '{{ test_plugin_hash }}'
salt: '{{ test_salt }}'
priv: '{{ test_default_priv }}' priv: '{{ test_default_priv }}'
register: result register: result
failed_when: result is not changed failed_when: result is not changed
@ -606,3 +608,21 @@
vars: vars:
user_name: "{{ test_user_name }}" user_name: "{{ test_user_name }}"
plugin_type: caching_sha2_password plugin_type: caching_sha2_password
- name: Plugin auth | Change user plugin again (should not change)
community.mysql.mysql_user:
<<: *mysql_params
name: '{{ test_user_name }}'
host: '%'
plugin: caching_sha2_password
plugin_hash_string: '{{ test_plugin_hash }}'
salt: '{{ test_salt }}'
priv: '{{ test_default_priv }}'
register: result
failed_when: result is changed
- name: Plugin auth | Check that the expected (not changed) plugin type is set
ansible.builtin.include_tasks: utils/assert_plugin.yml
vars:
user_name: "{{ test_user_name }}"
plugin_type: caching_sha2_password