mysql_db: fix doc formatting (#66087)

This commit is contained in:
Andrew Klychkov 2019-12-30 08:06:00 +03:00 committed by Abhijeet Kasurde
parent 074190ae54
commit fc2d7ae63e
2 changed files with 50 additions and 34 deletions

View file

@ -15,61 +15,73 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = r''' DOCUMENTATION = r'''
--- ---
module: mysql_db module: mysql_db
short_description: Add or remove MySQL databases from a remote host. short_description: Add or remove MySQL databases from a remote host
description: description:
- Add or remove MySQL databases from a remote host. - Add or remove MySQL databases from a remote host.
version_added: "0.6" version_added: '0.6'
options: options:
name: name:
description: description:
- name of the database to add or remove. - Name of the database to add or remove.
- I(name=all) May only be provided if I(state) is C(dump) or C(import). - I(name=all) may only be provided if I(state) is C(dump) or C(import).
- List of databases is provided with I(state=dump), I(state=present) and I(state=absent). - List of databases is provided with I(state=dump), I(state=present) and I(state=absent).
- if name=all Works like --all-databases option for mysqldump (Added in 2.0). - If I(name=all) it works like --all-databases option for mysqldump (Added in 2.0).
required: true required: true
type: list type: list
elements: str elements: str
aliases: [ db ] aliases: [db]
state: state:
description: description:
- The database state - The database state
type: str
default: present default: present
choices: [ "present", "absent", "dump", "import" ] choices: ['absent', 'dump', 'import', 'present']
collation: collation:
description: description:
- Collation mode (sorting). This only applies to new table/databases and does not update existing ones, this is a limitation of MySQL. - Collation mode (sorting). This only applies to new table/databases and
does not update existing ones, this is a limitation of MySQL.
type: str
default: ''
encoding: encoding:
description: description:
- Encoding mode to use, examples include C(utf8) or C(latin1_swedish_ci), at creation of database, dump or importation of sql script - Encoding mode to use, examples include C(utf8) or C(latin1_swedish_ci),
at creation of database, dump or importation of sql script.
type: str
default: ''
target: target:
description: description:
- Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL - Location, on the remote host, of the dump file to read from or write to.
files (C(.sql)) as well as bzip2 (C(.bz2)), gzip (C(.gz)) and xz (Added in 2.0) compressed files are supported. - Uncompressed SQL files (C(.sql)) as well as bzip2 (C(.bz2)), gzip (C(.gz)) and
xz (Added in 2.0) compressed files are supported.
type: path
single_transaction: single_transaction:
description: description:
- Execute the dump in a single transaction - Execute the dump in a single transaction.
type: bool type: bool
default: 'no' default: no
version_added: "2.1" version_added: '2.1'
quick: quick:
description: description:
- Option used for dumping large tables - Option used for dumping large tables.
type: bool type: bool
default: 'yes' default: yes
version_added: "2.1" version_added: '2.1'
ignore_tables: ignore_tables:
description: description:
- A list of table names that will be ignored in the dump of the form database_name.table_name - A list of table names that will be ignored in the dump
required: false of the form database_name.table_name.
type: list
elements: str
required: no
default: [] default: []
version_added: "2.7" version_added: '2.7'
hex_blob: hex_blob:
description: description:
- Dump binary columns using hexadecimal notation - Dump binary columns using hexadecimal notation.
required: false required: no
default: false default: no
type: bool type: bool
version_added: "2.10" version_added: '2.10'
force: force:
description: description:
- Continue dump or import even if we get an SQL error. - Continue dump or import even if we get an SQL error.
@ -77,7 +89,7 @@ options:
required: no required: no
type: bool type: bool
default: no default: no
version_added: "2.10" version_added: '2.10'
seealso: seealso:
- module: mysql_info - module: mysql_info
- module: mysql_variables - module: mysql_variables
@ -101,7 +113,8 @@ requirements:
- mysqldump (command line binary) - mysqldump (command line binary)
notes: notes:
- Requires the mysql and mysqldump binaries on the remote host. - Requires the mysql and mysqldump binaries on the remote host.
- This module is B(not idempotent) when I(state) is C(import), and will import the dump file each time if run more than once. - This module is B(not idempotent) when I(state) is C(import),
and will import the dump file each time if run more than once.
extends_documentation_fragment: mysql extends_documentation_fragment: mysql
''' '''
@ -158,7 +171,9 @@ EXAMPLES = r'''
target: /tmp/dump.sql target: /tmp/dump.sql
# Import of sql script with encoding option # Import of sql script with encoding option
- name: Import dump.sql with specific latin1 encoding, similar to mysql -u <username> --default-character-set=latin1 -p <password> < dump.sql - name: >
Import dump.sql with specific latin1 encoding,
similar to mysql -u <username> --default-character-set=latin1 -p <password> < dump.sql
mysql_db: mysql_db:
state: import state: import
name: all name: all
@ -166,7 +181,9 @@ EXAMPLES = r'''
target: /tmp/dump.sql target: /tmp/dump.sql
# Dump of database with encoding option # Dump of database with encoding option
- name: Dump of Databse with specific latin1 encoding, similar to mysqldump -u <username> --default-character-set=latin1 -p <password> <database> - name: >
Dump of Databse with specific latin1 encoding,
similar to mysqldump -u <username> --default-character-set=latin1 -p <password> <database>
mysql_db: mysql_db:
state: dump state: dump
name: db_1 name: db_1

View file

@ -1737,7 +1737,6 @@ lib/ansible/modules/database/mongodb/mongodb_user.py validate-modules:parameter-
lib/ansible/modules/database/mongodb/mongodb_user.py validate-modules:undocumented-parameter lib/ansible/modules/database/mongodb/mongodb_user.py validate-modules:undocumented-parameter
lib/ansible/modules/database/mssql/mssql_db.py validate-modules:doc-missing-type lib/ansible/modules/database/mssql/mssql_db.py validate-modules:doc-missing-type
lib/ansible/modules/database/mssql/mssql_db.py validate-modules:doc-required-mismatch lib/ansible/modules/database/mssql/mssql_db.py validate-modules:doc-required-mismatch
lib/ansible/modules/database/mysql/mysql_db.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/database/mysql/mysql_db.py validate-modules:use-run-command-not-popen lib/ansible/modules/database/mysql/mysql_db.py validate-modules:use-run-command-not-popen
lib/ansible/modules/database/mysql/mysql_user.py validate-modules:undocumented-parameter lib/ansible/modules/database/mysql/mysql_user.py validate-modules:undocumented-parameter
lib/ansible/modules/database/mysql/mysql_variables.py validate-modules:doc-required-mismatch lib/ansible/modules/database/mysql/mysql_variables.py validate-modules:doc-required-mismatch