W3cubDocs

/Ansible

proxysql_global_variables - Gets or sets the proxysql global variables.

New in version 2.3.

Synopsis

Options

parameter required default choices comments
config_file
no
Specify a config file from which login_user and login_password are to be read.
load_to_runtime
no True
Dynamically load mysql host config to runtime memory.
login_host
no 127.0.0.1
The host used to connect to ProxySQL admin interface.
login_password
no None
The password used to authenticate to ProxySQL admin interface.
login_port
no 6032
The port used to connect to ProxySQL admin interface.
login_user
no None
The username used to authenticate to ProxySQL admin interface.
save_to_disk
no True
Save mysql host config to sqlite db on disk to persist the configuration.
value
no
Defines a value the variable specified using variable should be set to.
variable
yes
Defines which variable should be returned, or if value is specified which variable should be updated.

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.

- 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.

- proxysql_global_variables:
    config_file: '~/proxysql.cnf'
    variable: 'mysql-default_query_delay'

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
stdout
Returns the mysql variable supplied with it's associted value.
Returns the current variable and value, or the newly set value for the variable supplied.. dict {'msg': 'The variable is already been set to the supplied value', 'var': {'variable_value': '3000', 'variable_name': 'mysql-poll_timeout'}, 'changed': False}

Status

This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/proxysql_global_variables_module.html