Note
This plugin is part of the community.proxysql collection (version 1.3.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
.
To use it in a playbook, specify: community.proxysql.proxysql_global_variables
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
config_file path | Default: "" | Specify a config file from which login_user and login_password are to be read. |
load_to_runtime boolean |
| Dynamically load config to runtime memory. |
login_host string | Default: "127.0.0.1" | The host used to connect to ProxySQL admin interface. |
login_password string | The password used to authenticate to ProxySQL admin interface. | |
login_port integer | Default: 6032 | The port used to connect to ProxySQL admin interface. |
login_unix_socket string | The socket used to connect to ProxySQL admin interface. | |
login_user string | The username used to authenticate to ProxySQL admin interface. | |
save_to_disk boolean |
| Save config to sqlite db on disk to persist the configuration. |
value string | Defines a value the variable specified using variable should be set to. | |
variable string / required | Defines which variable should be returned, or if value is specified which variable should be updated. |
Note
check_mode
.--- # 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'
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
stdout dictionary | Returns the current variable and value, or the newly set value for the variable supplied.. | Returns the mysql variable supplied with it's associated value. Sample: {'changed': False, 'msg': 'The variable is already been set to the supplied value', 'var': {'variable_name': 'mysql-poll_timeout', 'variable_value': '3000'}} |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/proxysql/proxysql_global_variables_module.html