mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added DOCUMENTATION to musql_db module.
This commit is contained in:
parent
8898643c1d
commit
a75348b406
1 changed files with 54 additions and 0 deletions
|
@ -19,6 +19,60 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
DOCUMENTATION = '''
|
||||||
|
---
|
||||||
|
module: mysql_db
|
||||||
|
short_description: Add or remove MySQL databases from a remote host.
|
||||||
|
description:
|
||||||
|
- Add or remove MySQL databases from a remote host.
|
||||||
|
version_added: "0.6"
|
||||||
|
options:
|
||||||
|
name:
|
||||||
|
description:
|
||||||
|
- name of the database to add or remove
|
||||||
|
required: true
|
||||||
|
default: null
|
||||||
|
login_user:
|
||||||
|
description:
|
||||||
|
- The username used to authenticate with
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
login_password:
|
||||||
|
description:
|
||||||
|
- The passwordused to authenticate with
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
login_host:
|
||||||
|
description:
|
||||||
|
- Host running the database
|
||||||
|
required: false
|
||||||
|
default: localhost
|
||||||
|
state:
|
||||||
|
description:
|
||||||
|
- The database state
|
||||||
|
required: false
|
||||||
|
default: present
|
||||||
|
choices: [ "present", "absent" ]
|
||||||
|
collation:
|
||||||
|
description:
|
||||||
|
- Collation mode
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
encoding:
|
||||||
|
description:
|
||||||
|
- Encoding mode
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
examples:
|
||||||
|
- code: mysql_db db=bobdata state=present
|
||||||
|
description: create a new database with name 'bobdata'
|
||||||
|
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.
|
||||||
|
requirements: [ ConfigParser ]
|
||||||
|
author: Mark Theunissen
|
||||||
|
'''
|
||||||
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
try:
|
try:
|
||||||
import MySQLdb
|
import MySQLdb
|
||||||
|
|
Loading…
Reference in a new issue