mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-20 01:11:27 -07:00
Initial switch to default=None for locked, will need to add a test for it.
Signed-off-by: E.S. Rosenberg a.k.a. Keeper of the Keys <es.rosenberg+github@gmail.com>
This commit is contained in:
parent
247bf5a65c
commit
41b6ff39bd
2 changed files with 4 additions and 3 deletions
|
@ -286,7 +286,7 @@ def is_hash(password):
|
|||
def user_mod(cursor, user, host, host_all, password, encrypted,
|
||||
plugin, plugin_hash_string, plugin_auth_string, salt, new_priv,
|
||||
append_privs, subtract_privs, attributes, tls_requires, module,
|
||||
password_expire, password_expire_interval, locked=False, role=False, maria_role=False):
|
||||
password_expire, password_expire_interval, locked=None, role=False, maria_role=False):
|
||||
changed = False
|
||||
msg = "User unchanged"
|
||||
grant_option = False
|
||||
|
@ -558,7 +558,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
if attribute_support:
|
||||
final_attributes = attributes_get(cursor, user, host)
|
||||
|
||||
if not role and user_is_locked(cursor, user, host) != locked:
|
||||
if not role and locked is not None and user_is_locked(cursor, user, host) != locked:
|
||||
if not module.check_mode:
|
||||
if locked:
|
||||
cursor.execute("ALTER USER %s@%s ACCOUNT LOCK", (user, host))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue