mysql_replication: add mutually_excl block, new maintainer, seealso, change doc formatting (#63295)

pull/63321/head
Andrey Klychkov 5 years ago committed by ansibot
parent 77de663879
commit 38d1025d58

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Balazs Pocze <banyek@gawker.com>
# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
# Certain parts are taken from Mark Theunissen's mysqldb module
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -19,22 +20,29 @@ DOCUMENTATION = r'''
module: mysql_replication
short_description: Manage MySQL replication
description:
- Manages MySQL server replication, slave, master status get and change master host.
version_added: "1.3"
- Manages MySQL server replication, slave, master status, get and change master host.
version_added: '1.3'
author:
- Balazs Pocze (@banyek)
- Andrew Klychkov (@Andersson007)
options:
mode:
description:
- module operating mode. Could be getslave (SHOW SLAVE STATUS), getmaster (SHOW MASTER STATUS), changemaster (CHANGE MASTER TO), startslave
(START SLAVE), stopslave (STOP SLAVE), resetslave (RESET SLAVE), resetslaveall (RESET SLAVE ALL)
- Module operating mode. Could be
C(changemaster) (CHANGE MASTER TO),
C(getmaster) (SHOW MASTER STATUS),
C(getslave) (SHOW SLAVE STATUS),
C(startslave) (START SLAVE),
C(stopslave) (STOP SLAVE),
C(resetslave) (RESET SLAVE),
C(resetslaveall) (RESET SLAVE ALL).
type: str
choices:
- getslave
- getmaster
- changemaster
- stopslave
- getmaster
- getslave
- startslave
- stopslave
- resetslave
- resetslaveall
default: getslave
@ -102,7 +110,7 @@ options:
description:
- Whether the host uses GTID based replication or not.
type: bool
version_added: "2.0"
version_added: '2.0'
master_use_gtid:
description:
- Configures the slave to use the MariaDB Global Transaction ID.
@ -112,31 +120,42 @@ options:
- Available since MariaDB 10.0.2.
choices: [current_pos, slave_pos, disabled]
type: str
version_added: "2.10"
version_added: '2.10'
master_delay:
description:
- Time lag behind the master's state (in seconds).
- Available from MySQL 5.6.
- For more information see U(https://dev.mysql.com/doc/refman/8.0/en/replication-delayed.html).
type: int
version_added: "2.10"
version_added: '2.10'
connection_name:
description:
- Name of the master connection.
- Supported from MariaDB 10.0.1.
- Mutually exclusive with I(channel).
- For more information see U(https://mariadb.com/kb/en/library/multi-source-replication/).
type: str
version_added: "2.10"
version_added: '2.10'
channel:
description:
- Name of replication channel.
- Multi-source replication is supported from MySQL 5.7.
- Mutually exclusive with I(connection_name).
- For more information see U(https://dev.mysql.com/doc/refman/8.0/en/replication-multi-source.html).
type: str
version_added: "2.10"
version_added: '2.10'
extends_documentation_fragment:
- mysql
seealso:
- module: mysql_info
- name: MySQL replication reference
description: Complete reference of the MySQL replication documentation.
link: https://dev.mysql.com/doc/refman/8.0/en/replication.html
- name: MariaDB replication reference
description: Complete reference of the MariaDB replication documentation.
link: https://mariadb.com/kb/en/library/setting-up-replication/
'''
EXAMPLES = r'''
@ -342,7 +361,10 @@ def main():
master_delay=dict(type='int'),
connection_name=dict(type='str'),
channel=dict(type='str'),
)
),
mutually_exclusive=[
['connection_name', 'channel']
],
)
mode = module.params["mode"]
master_host = module.params["master_host"]

Loading…
Cancel
Save