mysql_user password expiration support
resuni opened this issue · 5 comments
resuni commented
SUMMARY
Being able to manage user password expiration using the mysql_user module would be handy.
- https://dev.mysql.com/doc/refman/5.7/en/password-management.html
- https://dev.mysql.com/doc/refman/5.7/en/create-user.html
- https://dev.mysql.com/doc/refman/5.7/en/alter-user.html
ISSUE TYPE
- Feature Idea
COMPONENT NAME
- mysql_user
ADDITIONAL INFORMATION
Parameters would correspond with the PASSWORD EXPIRE
syntax of the CREATE USER
and ALTER USER
commands. I envision two new parameters being created to support this:
password_expire
- Accepted values:DEFAULT
,NEVER
,INTERVAL
password_expire_interval
- Used to specify interval in days, ifpassword_expire
is set toINTERVAL
.
# Create/alter user with password that expires every 90 days
- name: create user
mysql_user:
name: resuni
host: "127.0.0.1"
password: pass123
password_expire: INTERVAL
password_expire_interval: 90
# Create/alter user with password that doesn't expire
- name: create user
mysql_user:
name: resuni
host: "127.0.0.1"
password: pass123
password_expire: NEVER
# Create/alter user to use default password expiration policy as defined in mysqld.cnf
- name: create user
mysql_user:
name: resuni
host: "127.0.0.1"
password: pass123
password_expire: DEFAULT
markuman commented
For the record:
mariadb >= 10.4.3
mysql >= 10.6.6
no idea if this must be still covered.
@resuni do you have some time to implement that parameter?
resuni commented
@markuman Not in the near future. I might have some time later this year if no one else gets to it before then.
Andersson007 commented
@resuni hi, thanks for the feature request!
I've put the help_wanted
label