mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-18 00:11:26 -07:00
Add check_mode support.
Signed-off-by: E.S. Rosenberg a.k.a. Keeper of the Keys <es.rosenberg+github@gmail.com>
This commit is contained in:
parent
e95c3dab6b
commit
3984380acb
1 changed files with 7 additions and 6 deletions
|
@ -553,6 +553,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
final_attributes = attributes_get(cursor, user, host)
|
||||
|
||||
if user_is_locked(cursor, user, host) != locked:
|
||||
if not module.check_mode:
|
||||
if locked:
|
||||
cursor.execute("ALTER USER %s@%s ACCOUNT LOCK", (user, host))
|
||||
msg = 'User locked'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue