From 23b1777fa25e24ad38ca44ec48135dd556c5db0d Mon Sep 17 00:00:00 2001 From: Hubertus Krogmann Date: Wed, 25 May 2022 15:05:23 +0200 Subject: [PATCH] additional documentation to password,plugin,plugin_hash_string,plugin_auth_string options, format fix on changelog --- .../fragments/334-mysql_user_fix_logic_on_oncreate.yml | 4 +--- plugins/modules/mysql_user.py | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/changelogs/fragments/334-mysql_user_fix_logic_on_oncreate.yml b/changelogs/fragments/334-mysql_user_fix_logic_on_oncreate.yml index 2f3437a..ec55c7d 100644 --- a/changelogs/fragments/334-mysql_user_fix_logic_on_oncreate.yml +++ b/changelogs/fragments/334-mysql_user_fix_logic_on_oncreate.yml @@ -1,4 +1,2 @@ bugfixes: - - "mysql_user - fix logic when ``update_password`` is set to ``on_create`` for users using ``plugin*`` arguments (https://github.com/ansible-collections/community.mysql/issues/334)." - - ``on_create`` sets ``password`` to None for old mysql_native_authentication but not for authentiation methods which uses the ``plugin*`` arguments - - this PR changes this so ``on_create`` also exchange ``plugin``, ``plugin_hash_string``, ``plugin_auth_string`` to None in the list of arguments to change + - "mysql_user - fix logic when ``update_password`` is set to ``on_create`` for users using ``plugin*`` arguments (https://github.com/ansible-collections/community.mysql/issues/334).". The ``on_create`` sets ``password`` to None for old mysql_native_authentication but not for authentiation methods which uses the ``plugin*`` arguments. This PR changes this so ``on_create`` also exchange ``plugin``, ``plugin_hash_string``, ``plugin_auth_string`` to None in the list of arguments to change diff --git a/plugins/modules/mysql_user.py b/plugins/modules/mysql_user.py index ca1c457..235883e 100644 --- a/plugins/modules/mysql_user.py +++ b/plugins/modules/mysql_user.py @@ -22,7 +22,7 @@ options: required: true password: description: - - Set the user's password. + - Set the user's password. Only for `mysql_native_password` authentication. For other authentication plugins see the combination of plugin, plugin_hash_string, plugin_auth_string. type: str encrypted: description: @@ -115,8 +115,8 @@ options: default: no update_password: description: - - C(always) will update passwords if they differ. - - C(on_create) will only set the password for newly created users. + - C(always) will update passwords if they differ. This affects password and the combinationi of plugin, plugin_hash_string, plugin_auth_string + - C(on_create) will only set the password or the combination of plugin, plugin_hash_string, plugin_auth_string for newly created users. type: str choices: [ always, on_create ] default: always