mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
97 lines
No EOL
2.7 KiB
JSON
97 lines
No EOL
2.7 KiB
JSON
{
|
|
"requirements": [
|
|
"ConfigParser",
|
|
"MySQLdb"
|
|
],
|
|
"description": [
|
|
"Adds or removes a user from a MySQL database."
|
|
],
|
|
"author": "Mark Theunissen",
|
|
"notes": [
|
|
"Requires the MySQLdb Python package on the remote host. For Ubuntu, this is as easy as apt-get install python-mysqldb.",
|
|
"Both C(login_password) and C(login_username) are required when you are passing credentials. If none are present, the module will attempt to read the credentials from C(~/.my.cnf), and finally fall back to using the MySQL default login of 'root' with no password."
|
|
],
|
|
"docuri": "mysql-user",
|
|
"module": "mysql_user",
|
|
"filename": "library/mysql_user",
|
|
"examples": [
|
|
{
|
|
"code": "mysql_user name=bob password=12345 priv=*.*:ALL state=present",
|
|
"description": "Create database user with name 'bob' and password '12345' with all database privileges"
|
|
},
|
|
{
|
|
"code": "mysql_user login_user=root login_password=123456 name=sally state=absent",
|
|
"description": "Ensure no user named 'sally' exists, also passing in the auth credentials."
|
|
},
|
|
{
|
|
"code": "mydb.*:INSERT,UPDATE/anotherdb.*:SELECT/yetanotherdb.*:ALL",
|
|
"description": "Example privileges string format"
|
|
}
|
|
],
|
|
"version_added": "0.6",
|
|
"short_description": "Adds or removes a user from a MySQL database.",
|
|
"now_date": "2012-10-09",
|
|
"options": {
|
|
"name": {
|
|
"default": null,
|
|
"required": true,
|
|
"description": [
|
|
"name of the user (role) to add or remove"
|
|
]
|
|
},
|
|
"login_user": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"The username used to authenticate with"
|
|
]
|
|
},
|
|
"login_host": {
|
|
"default": "localhost",
|
|
"required": false,
|
|
"description": [
|
|
"Host running the database"
|
|
]
|
|
},
|
|
"host": {
|
|
"default": "localhost",
|
|
"required": false,
|
|
"description": [
|
|
"the 'host' part of the MySQL username"
|
|
]
|
|
},
|
|
"state": {
|
|
"default": "present",
|
|
"required": false,
|
|
"description": [
|
|
"The database state"
|
|
],
|
|
"choices": [
|
|
"present",
|
|
"absent"
|
|
]
|
|
},
|
|
"login_password": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"The password used to authenticate with"
|
|
]
|
|
},
|
|
"password": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"set the user's password"
|
|
]
|
|
},
|
|
"priv": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"MySQL privileges string in the format: C(db.table:priv1,priv2)"
|
|
]
|
|
}
|
|
},
|
|
"ansible_version": "0.8"
|
|
} |