community.proxysql.proxysql_global_variables module – Gets or sets the proxysql global variables
Note
This module is part of the community.proxysql collection (version 1.4.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.proxysql
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.proxysql.proxysql_global_variables
.
Synopsis
The community.proxysql.proxysql_global_variables module gets or sets the proxysql global variables.
Requirements
The below requirements are needed on the host that executes this module.
PyMySQL
mysqlclient
Parameters
Parameter |
Comments |
---|---|
Specify a config file from which login_user and login_password are to be read. Default: |
|
Dynamically load config to runtime memory. Choices:
|
|
The host used to connect to ProxySQL admin interface. Default: |
|
The password used to authenticate to ProxySQL admin interface. |
|
The port used to connect to ProxySQL admin interface. Default: |
|
The socket used to connect to ProxySQL admin interface. |
|
The username used to authenticate to ProxySQL admin interface. |
|
Save config to sqlite db on disk to persist the configuration. Choices:
|
|
Defines a value the variable specified using variable should be set to. |
|
Defines which variable should be returned, or if value is specified which variable should be updated. |
Notes
Note
Supports
check_mode
.
Examples
---
# This example sets the value of a variable, saves the mysql admin variables
# config to disk, and dynamically loads the mysql admin variables config to
# runtime. It uses supplied credentials to connect to the proxysql admin
# interface.
- name: Set the value of a variable
community.proxysql.proxysql_global_variables:
login_user: 'admin'
login_password: 'admin'
variable: 'mysql-max_connections'
value: 4096
# This example gets the value of a variable. It uses credentials in a
# supplied config file to connect to the proxysql admin interface.
- name: Get the value of a variable
community.proxysql.proxysql_global_variables:
config_file: '~/proxysql.cnf'
variable: 'mysql-default_query_delay'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Returns the mysql variable supplied with it’s associated value. Returned: Returns the current variable and value, or the newly set value for the variable supplied.. Sample: |