mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-23 10:51:25 -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
|
return False
|
||||||
|
|
||||||
msg, locking = validate_account_locking(cursor, account_locking)
|
msg, locking = validate_account_locking(cursor, account_locking)
|
||||||
if msg:
|
if msg and account_locking:
|
||||||
module.warn(msg)
|
module.warn(msg)
|
||||||
module.warn("Account locking settings are being ignored.")
|
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
|
# Handle Account locking
|
||||||
note, locking = validate_account_locking(cursor, account_locking)
|
note, locking = validate_account_locking(cursor, account_locking)
|
||||||
if note:
|
if note and account_locking:
|
||||||
module.warn(note)
|
module.warn(note)
|
||||||
module.warn("Account locking settings are being ignored.")
|
module.warn("Account locking settings are being ignored.")
|
||||||
current_locking = get_account_locking(cursor, user, host)
|
current_locking = get_account_locking(cursor, user, host)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue