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,69 +15,81 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = r'''
---
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:
- Add or remove MySQL databases from a remote host.
version_added: "0.6"
- Add or remove MySQL databases from a remote host.
version_added: '0.6'
options:
name:
description:
- name of the database to add or remove.
- 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).
- if name=all Works like --all-databases option for mysqldump (Added in 2.0).
- Name of the database to add or remove.
- 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).
- If I(name=all) it works like --all-databases option for mysqldump (Added in 2.0).
required: true
type: list
elements: str
aliases: [ db ]
aliases: [db]
state:
description:
- The database state
- The database state
type: str
default: present
choices: [ "present", "absent", "dump", "import" ]
choices: ['absent', 'dump', 'import', 'present']
collation:
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:
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:
description:
- Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL
files (C(.sql)) as well as bzip2 (C(.bz2)), gzip (C(.gz)) and xz (Added in 2.0) compressed files are supported.
- Location, on the remote host, of the dump file to read from or write to.
- 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:
description:
- Execute the dump in a single transaction
- Execute the dump in a single transaction.
type: bool
default: 'no'
version_added: "2.1"
default: no
version_added: '2.1'
quick:
description:
- Option used for dumping large tables
- Option used for dumping large tables.
type: bool
default: 'yes'
version_added: "2.1"
default: yes
version_added: '2.1'
ignore_tables:
description:
- A list of table names that will be ignored in the dump of the form database_name.table_name
required: false
- A list of table names that will be ignored in the dump
of the form database_name.table_name.
type: list
elements: str
required: no
default: []
version_added: "2.7"
version_added: '2.7'
hex_blob:
description:
- Dump binary columns using hexadecimal notation
required: false
default: false
- Dump binary columns using hexadecimal notation.
required: no
default: no
type: bool
version_added: "2.10"
version_added: '2.10'
force:
description:
- Continue dump or import even if we get an SQL error.
- Used only when I(state) is C(dump) or C(import).
- Continue dump or import even if we get an SQL error.
- Used only when I(state) is C(dump) or C(import).
required: no
type: bool
default: no
version_added: "2.10"
version_added: '2.10'
seealso:
- module: mysql_info
- module: mysql_variables
@ -101,7 +113,8 @@ requirements:
- mysqldump (command line binary)
notes:
- 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
'''
@ -158,7 +171,9 @@ EXAMPLES = r'''
target: /tmp/dump.sql
# 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:
state: import
name: all
@ -166,7 +181,9 @@ EXAMPLES = r'''
target: /tmp/dump.sql
# 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:
state: dump
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/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/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_user.py validate-modules:undocumented-parameter
lib/ansible/modules/database/mysql/mysql_variables.py validate-modules:doc-required-mismatch