ANSIBLE.MYSQL_USER(3)           ANSIBLE MODULES          ANSIBLE.MYSQL_USER(3)



NAME
       mysql_user - Adds or removes a user from a MySQL database.

DESCRIPTION
       Adds or removes a user from a MySQL database.

OPTIONS
       host   the 'host' part of the MySQL username (default: localhost)

       login_host
              Host running the database (default: localhost)

       login_password
              The password used to authenticate with

       login_user
              The username used to authenticate with

       name   name of the user (role) to add or remove(required)

       password
              set the user's password

       priv   MySQL privileges string in the format: db.table:priv1,priv2

       state  The database state Choices: present,absent. (default: present)."

NOTES
       Requires the MySQLdb Python package on the remote host. For Ubuntu,
       this is as easy as apt-get install python-mysqldb.

       Both login_password and login_username are required when you are
       passing credentials. If none are present, the module will attempt to
       read the credentials from ~/.my.cnf, and finally fall back to using the
       MySQL default login of 'root' with no password.

EXAMPLES
       Create database user with name 'bob' and password '12345' with all
       database privileges

       mysql_user: name=bob password=12345 priv=*.*:ALL state=present

       Ensure no user named 'sally' exists, also passing in the auth
       credentials.

       mysql_user: login_user=root login_password=123456 name=sally state=absent

       Example privileges string format

       mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL

AUTHOR
       Mark Theunissen

SEE ALSO
       ansible(1), http://ansible.github.com/modules.html#mysql-user



0.9                               2012-11-30             ANSIBLE.MYSQL_USER(3)
