mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-23 19:01:28 -07:00
Log account locking warnings only when locking is requested
This commit is contained in:
parent
aaf70204cb
commit
9730eeb52c
1 changed files with 2 additions and 2 deletions
|
@ -559,7 +559,7 @@ def user_add(cursor, user, host, host_all, password, encrypted,
|
|||
return False
|
||||
|
||||
msg, locking = validate_account_locking(cursor, account_locking)
|
||||
if msg:
|
||||
if msg and account_locking:
|
||||
module.warn(msg)
|
||||
module.warn("Account locking settings are being ignored.")
|
||||
|
||||
|
@ -797,7 +797,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
|
||||
# Handle Account locking
|
||||
note, locking = validate_account_locking(cursor, account_locking)
|
||||
if note:
|
||||
if note and account_locking:
|
||||
module.warn(note)
|
||||
module.warn("Account locking settings are being ignored.")
|
||||
current_locking = get_account_locking(cursor, user, host)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue