mysql_db: improve documentation formatting

This commit is contained in:
Andrew Klychkov 2020-11-25 16:07:32 +03:00
parent 09d0ce2ce0
commit 3c9431bfd4

View file

@ -27,7 +27,7 @@ options:
aliases: [db] aliases: [db]
state: state:
description: description:
- The database state - The database state.
type: str type: str
default: present default: present
choices: ['absent', 'dump', 'import', 'present'] choices: ['absent', 'dump', 'import', 'present']
@ -65,20 +65,17 @@ options:
of the form database_name.table_name. of the form database_name.table_name.
type: list type: list
elements: str elements: str
required: no
default: [] default: []
hex_blob: hex_blob:
description: description:
- Dump binary columns using hexadecimal notation. - Dump binary columns using hexadecimal notation.
required: no
default: no
type: bool type: bool
default: no
version_added: '0.1.0' version_added: '0.1.0'
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.
- Used only when I(state) is C(dump) or C(import). - Used only when I(state) is C(dump) or C(import).
required: no
type: bool type: bool
default: no default: no
version_added: '0.1.0' version_added: '0.1.0'
@ -91,7 +88,6 @@ options:
required on the slave to start the replication process. required on the slave to start the replication process.
- C(2) to generate a commented 'CHANGE MASTER TO'. - C(2) to generate a commented 'CHANGE MASTER TO'.
- Can be used when I(state=dump). - Can be used when I(state=dump).
required: no
type: int type: int
choices: [0, 1, 2] choices: [0, 1, 2]
default: 0 default: 0
@ -99,7 +95,6 @@ options:
skip_lock_tables: skip_lock_tables:
description: description:
- Skip locking tables for read. Used when I(state=dump), ignored otherwise. - Skip locking tables for read. Used when I(state=dump), ignored otherwise.
required: no
type: bool type: bool
default: no default: no
version_added: '0.1.0' version_added: '0.1.0'
@ -107,7 +102,6 @@ options:
description: description:
- Provide additional arguments for mysqldump. - Provide additional arguments for mysqldump.
Used when I(state=dump) only, ignored otherwise. Used when I(state=dump) only, ignored otherwise.
required: no
type: str type: str
version_added: '0.1.0' version_added: '0.1.0'
use_shell: use_shell:
@ -115,22 +109,25 @@ options:
- Used to prevent C(Broken pipe) errors when the imported I(target) file is compressed. - Used to prevent C(Broken pipe) errors when the imported I(target) file is compressed.
- If C(yes), the module will internally execute commands via a shell. - If C(yes), the module will internally execute commands via a shell.
- Used when I(state=import), ignored otherwise. - Used when I(state=import), ignored otherwise.
required: no
type: bool type: bool
default: no default: no
version_added: '0.1.0' version_added: '0.1.0'
unsafe_login_password: unsafe_login_password:
description: description:
- If C(no), the module will safely use a shell-escaped version of the I(login_password) value. - If C(no), the module will safely use a shell-escaped
- It makes sense to use C(yes) only if there are special symbols in the value and errors C(Access denied) occur. version of the I(login_password) value.
- Used only when I(state) is C(import) or C(dump) and I(login_password) is passed, ignored otherwise. - It makes sense to use C(yes) only if there are special
symbols in the value and errors C(Access denied) occur.
- Used only when I(state) is C(import) or C(dump) and
I(login_password) is passed, ignored otherwise.
type: bool type: bool
default: no default: no
version_added: '0.1.0' version_added: '0.1.0'
restrict_config_file: restrict_config_file:
description: description:
- Read only passed I(config_file). - Read only passed I(config_file).
- When I(state) is C(dump) or C(import), by default the module passes I(config_file) parameter - When I(state) is C(dump) or C(import),
by default the module passes I(config_file) parameter
using C(--defaults-extra-file) command-line argument to C(mysql/mysqldump) utilities using C(--defaults-extra-file) command-line argument to C(mysql/mysqldump) utilities
under the hood that read named option file in addition to usual option files. under the hood that read named option file in addition to usual option files.
- If this behavior is undesirable, use C(yes) to read only named option file. - If this behavior is undesirable, use C(yes) to read only named option file.
@ -176,6 +173,7 @@ requirements:
- mysql (command line binary) - mysql (command line binary)
- mysqldump (command line binary) - mysqldump (command line binary)
notes: notes:
- Supports C(check_mode).
- 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), - 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. and will import the dump file each time if run more than once.