mysql_user

Collection: community.general

Full Name: parallax.community.general.mysql_user

Aliases: community.general.mysql_user, mysql_user

Synopsis

Manage mysql user

Parameters

NameTypeRequiredDefaultDescription
namestringyesName of the MySQL user
passwordstringPassword for the user
hoststringlocalhostThe host part of the MySQL username
statestringpresentState of the user Choices: present, absent
privstringMySQL privileges string (e.g. db.*:ALL)
login_hoststringlocalhostHost running MySQL
login_portint3306Port of the MySQL server
login_userstringrootUser to authenticate with
login_passwordstringPassword for authentication
login_unix_socketstringPath to a Unix socket for local connections
encryptedboolfalseWhether the password is already encrypted
append_privsboolfalseAppend privileges instead of overwriting
check_implicit_adminboolfalseCheck if mysql allows login as root without password
update_passwordstringalwaysWhen to update the password Choices: always, on_create
pluginstringAuthentication plugin for the user
plugin_auth_stringstringAuthentication string for the plugin
plugin_hash_stringstringAuthentication hash for the plugin
resource_limitsstringResource limits for the user (JSON format)
tls_requiresstringTLS requirements for the user

Example

- name: Example mysql_user task
  mysql_user:
    name: <your_name>