Update plugins/module_utils/user.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
tompal3 2024-02-20 21:36:15 +02:00 committed by GitHub
parent 40e43ac76a
commit c415325901
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -966,13 +966,13 @@ def set_password_expire(cursor, user, host, password_expire, password_expire_int
password_expire_days (int): Invterval of days password expires.
"""
if password_expire.lower() == "never":
statment = "PASSWORD EXPIRE NEVER"
statement = "PASSWORD EXPIRE NEVER"
elif password_expire.lower() == "default":
statment = "PASSWORD EXPIRE DEFAULT"
statement = "PASSWORD EXPIRE DEFAULT"
elif password_expire.lower() == "interval":
statment = "PASSWORD EXPIRE INTERVAL %d DAY" % (password_expire_interval)
statement = "PASSWORD EXPIRE INTERVAL %d DAY" % (password_expire_interval)
elif password_expire.lower() == "now":
statment = "PASSWORD EXPIRE"
statement = "PASSWORD EXPIRE"
params = (user, host)
query = ["ALTER USER %s@%s"]