diff --git a/changelogs/fragments/72-mysql_user_change_detection.yml b/changelogs/fragments/72-mysql_user_change_detection.yml new file mode 100644 index 0000000..21c6141 --- /dev/null +++ b/changelogs/fragments/72-mysql_user_change_detection.yml @@ -0,0 +1,2 @@ +bugfixes: +- mysql_user - fixed change detection when using append_privs (https://github.com/ansible-collections/community.mysql/pull/72). diff --git a/tests/integration/targets/test_mysql_user/tasks/main.yml b/tests/integration/targets/test_mysql_user/tasks/main.yml index 1e201a0..52ea0c7 100644 --- a/tests/integration/targets/test_mysql_user/tasks/main.yml +++ b/tests/integration/targets/test_mysql_user/tasks/main.yml @@ -263,7 +263,8 @@ # Test that append_privs will not attempt to make a change where current privileges are a superset of new privileges # (https://github.com/ansible-collections/community.mysql/issues/69) - - include: test_priv_append_no_change.yml + - include: test_priv_append_no_change.yml enable_check_mode=no + - include: test_priv_append_no_change.yml enable_check_mode=yes # Tests for the TLS requires dictionary - include: tls_requirements.yml diff --git a/tests/integration/targets/test_mysql_user/tasks/test_priv_append_no_change.yml b/tests/integration/targets/test_mysql_user/tasks/test_priv_append_no_change.yml index 3ef1c30..c952970 100644 --- a/tests/integration/targets/test_mysql_user/tasks/test_priv_append_no_change.yml +++ b/tests/integration/targets/test_mysql_user/tasks/test_priv_append_no_change.yml @@ -44,6 +44,7 @@ priv: 'data1.*:SELECT/data2.*:SELECT' append_privs: yes state: present + check_mode: '{{ enable_check_mode }}' register: result - name: Assert that there wasn't a change and that the permissions are still the same