community.proxysql.proxysql_global_variables (1.5.1) — module

Gets or sets the proxysql global variables

Authors: Ben Mildren (@bmildren)

Install collection

Install with ansible-galaxy collection install community.proxysql:==1.5.1


Add to requirements.yml

  collections:
    - name: community.proxysql
      version: 1.5.1

Description

The M(community.proxysql.proxysql_global_variables) module gets or sets the proxysql global variables.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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'

Inputs

    
value:
    description:
    - Defines a value the variable specified using I(variable) should be set to.
    type: str

variable:
    description:
    - Defines which variable should be returned, or if I(value) is specified which variable
      should be updated.
    required: true
    type: str

login_host:
    default: 127.0.0.1
    description:
    - The host used to connect to ProxySQL admin interface.
    type: str

login_port:
    default: 6032
    description:
    - The port used to connect to ProxySQL admin interface.
    type: int

login_user:
    description:
    - The username used to authenticate to ProxySQL admin interface.
    type: str

config_file:
    default: ''
    description:
    - Specify a config file from which I(login_user) and I(login_password) are to be read.
    type: path

save_to_disk:
    default: true
    description:
    - Save config to sqlite db on disk to persist the configuration.
    type: bool

login_password:
    description:
    - The password used to authenticate to ProxySQL admin interface.
    type: str

load_to_runtime:
    default: true
    description:
    - Dynamically load config to runtime memory.
    type: bool

login_unix_socket:
    description:
    - The socket used to connect to ProxySQL admin interface.
    type: str

Outputs

stdout:
  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:
    changed: false
    msg: The variable is already been set to the supplied value
    var:
      variable_name: mysql-poll_timeout
      variable_value: '3000'
  type: dict