mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 04:49:09 -07:00
Added docs fragment for proxysql (#32502)
* Added docs fragment for proxysql * Added formatting for option names, and bool types * Updated proxysql modules to use doc fragments
This commit is contained in:
parent
e693d7e37c
commit
d668281a6b
8 changed files with 70 additions and 203 deletions
|
@ -85,36 +85,9 @@ options:
|
||||||
- When C(present) - adds the host, when C(absent) - removes the host.
|
- When C(present) - adds the host, when C(absent) - removes the host.
|
||||||
choices: [ "present", "absent" ]
|
choices: [ "present", "absent" ]
|
||||||
default: present
|
default: present
|
||||||
save_to_disk:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.managing_config
|
||||||
- Save mysql host config to sqlite db on disk to persist the
|
- proxysql.connectivity
|
||||||
configuration.
|
|
||||||
default: True
|
|
||||||
load_to_runtime:
|
|
||||||
description:
|
|
||||||
- Dynamically load mysql host config to runtime memory.
|
|
||||||
default: True
|
|
||||||
login_user:
|
|
||||||
description:
|
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -25,36 +25,9 @@ options:
|
||||||
description:
|
description:
|
||||||
- Defines a value the variable specified using I(variable) should be set
|
- Defines a value the variable specified using I(variable) should be set
|
||||||
to.
|
to.
|
||||||
save_to_disk:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.managing_config
|
||||||
- Save mysql host config to sqlite db on disk to persist the
|
- proxysql.connectivity
|
||||||
configuration.
|
|
||||||
default: True
|
|
||||||
load_to_runtime:
|
|
||||||
description:
|
|
||||||
- Dynamically load mysql host config to runtime memory.
|
|
||||||
default: True
|
|
||||||
login_user:
|
|
||||||
description:
|
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -52,27 +52,8 @@ options:
|
||||||
config file.
|
config file.
|
||||||
choices: [ "MEMORY", "DISK", "RUNTIME", "CONFIG" ]
|
choices: [ "MEMORY", "DISK", "RUNTIME", "CONFIG" ]
|
||||||
required: True
|
required: True
|
||||||
login_user:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.connectivity
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -47,8 +47,8 @@ options:
|
||||||
to ProxySQL (thus a "frontend" user), transactions started within a
|
to ProxySQL (thus a "frontend" user), transactions started within a
|
||||||
hostgroup will remain within that hostgroup regardless of any other
|
hostgroup will remain within that hostgroup regardless of any other
|
||||||
rules.
|
rules.
|
||||||
If omitted the proxysql database default for I(transaction_persistent) is
|
If omitted the proxysql database default for I(transaction_persistent)
|
||||||
C(False).
|
is C(False).
|
||||||
fast_forward:
|
fast_forward:
|
||||||
description:
|
description:
|
||||||
- If I(fast_forward) is set to C(True), I(fast_forward) will bypass the
|
- If I(fast_forward) is set to C(True), I(fast_forward) will bypass the
|
||||||
|
@ -75,36 +75,9 @@ options:
|
||||||
- When C(present) - adds the user, when C(absent) - removes the user.
|
- When C(present) - adds the user, when C(absent) - removes the user.
|
||||||
choices: [ "present", "absent" ]
|
choices: [ "present", "absent" ]
|
||||||
default: present
|
default: present
|
||||||
save_to_disk:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.managing_config
|
||||||
- Save mysql host config to sqlite db on disk to persist the
|
- proxysql.connectivity
|
||||||
configuration.
|
|
||||||
default: True
|
|
||||||
load_to_runtime:
|
|
||||||
description:
|
|
||||||
- Dynamically load mysql host config to runtime memory.
|
|
||||||
default: True
|
|
||||||
login_user:
|
|
||||||
description:
|
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -134,36 +134,9 @@ options:
|
||||||
however if you need this behaviour and you're not concerned about the
|
however if you need this behaviour and you're not concerned about the
|
||||||
schedules deleted, you can set I(force_delete) to C(True).
|
schedules deleted, you can set I(force_delete) to C(True).
|
||||||
default: False
|
default: False
|
||||||
save_to_disk:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.managing_config
|
||||||
- Save mysql host config to sqlite db on disk to persist the
|
- proxysql.connectivity
|
||||||
configuration.
|
|
||||||
default: True
|
|
||||||
load_to_runtime:
|
|
||||||
description:
|
|
||||||
- Dynamically load mysql host config to runtime memory.
|
|
||||||
default: True
|
|
||||||
login_user:
|
|
||||||
description:
|
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -37,36 +37,9 @@ options:
|
||||||
removes the replication hostgroup.
|
removes the replication hostgroup.
|
||||||
choices: [ "present", "absent" ]
|
choices: [ "present", "absent" ]
|
||||||
default: present
|
default: present
|
||||||
save_to_disk:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.managing_config
|
||||||
- Save mysql host config to sqlite db on disk to persist the
|
- proxysql.connectivity
|
||||||
configuration.
|
|
||||||
default: True
|
|
||||||
load_to_runtime:
|
|
||||||
description:
|
|
||||||
- Dynamically load mysql host config to runtime memory.
|
|
||||||
default: True
|
|
||||||
login_user:
|
|
||||||
description:
|
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
|
@ -60,36 +60,9 @@ options:
|
||||||
however if you need this behaviour and you're not concerned about the
|
however if you need this behaviour and you're not concerned about the
|
||||||
schedules deleted, you can set I(force_delete) to C(True).
|
schedules deleted, you can set I(force_delete) to C(True).
|
||||||
default: False
|
default: False
|
||||||
save_to_disk:
|
extends_documentation_fragment:
|
||||||
description:
|
- proxysql.managing_config
|
||||||
- Save mysql host config to sqlite db on disk to persist the
|
- proxysql.connectivity
|
||||||
configuration.
|
|
||||||
default: True
|
|
||||||
load_to_runtime:
|
|
||||||
description:
|
|
||||||
- Dynamically load mysql host config to runtime memory.
|
|
||||||
default: True
|
|
||||||
login_user:
|
|
||||||
description:
|
|
||||||
- The username used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_password:
|
|
||||||
description:
|
|
||||||
- The password used to authenticate to ProxySQL admin interface.
|
|
||||||
default: None
|
|
||||||
login_host:
|
|
||||||
description:
|
|
||||||
- The host used to connect to ProxySQL admin interface.
|
|
||||||
default: '127.0.0.1'
|
|
||||||
login_port:
|
|
||||||
description:
|
|
||||||
- The port used to connect to ProxySQL admin interface.
|
|
||||||
default: 6032
|
|
||||||
config_file:
|
|
||||||
description:
|
|
||||||
- Specify a config file from which login_user and login_password are to
|
|
||||||
be read.
|
|
||||||
default: ''
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
|
48
lib/ansible/utils/module_docs_fragments/proxysql.py
Normal file
48
lib/ansible/utils/module_docs_fragments/proxysql.py
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# Copyright: (c) 2017, Ansible Project
|
||||||
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
|
|
||||||
|
|
||||||
|
class ModuleDocFragment(object):
|
||||||
|
|
||||||
|
# Documentation fragment for ProxySQL connectivity
|
||||||
|
CONNECTIVITY = '''
|
||||||
|
options:
|
||||||
|
login_user:
|
||||||
|
description:
|
||||||
|
- The username used to authenticate to ProxySQL admin interface.
|
||||||
|
default: None
|
||||||
|
login_password:
|
||||||
|
description:
|
||||||
|
- The password used to authenticate to ProxySQL admin interface.
|
||||||
|
default: None
|
||||||
|
login_host:
|
||||||
|
description:
|
||||||
|
- The host used to connect to ProxySQL admin interface.
|
||||||
|
default: '127.0.0.1'
|
||||||
|
login_port:
|
||||||
|
description:
|
||||||
|
- The port used to connect to ProxySQL admin interface.
|
||||||
|
default: 6032
|
||||||
|
config_file:
|
||||||
|
description:
|
||||||
|
- Specify a config file from which I(login_user) and I(login_password)
|
||||||
|
are to be read.
|
||||||
|
default: ''
|
||||||
|
requirements:
|
||||||
|
- MySQLdb
|
||||||
|
'''
|
||||||
|
|
||||||
|
# Documentation fragment for managing ProxySQL configuration
|
||||||
|
MANAGING_CONFIG = '''
|
||||||
|
options:
|
||||||
|
save_to_disk:
|
||||||
|
description:
|
||||||
|
- Save config to sqlite db on disk to persist the configuration.
|
||||||
|
type: bool
|
||||||
|
default: True
|
||||||
|
load_to_runtime:
|
||||||
|
description:
|
||||||
|
- Dynamically load config to runtime memory.
|
||||||
|
type: bool
|
||||||
|
default: True
|
||||||
|
'''
|
Loading…
Add table
Add a link
Reference in a new issue