community.proxysql.proxysql_manage_config – Writes the proxysql configuration settings between layers.¶
Note
This plugin is part of the community.proxysql collection (version 1.0.0).
To install it use: ansible-galaxy collection install community.proxysql
.
To use it in a playbook, specify: community.proxysql.proxysql_manage_config
.
Synopsis¶
The community.proxysql.proxysql_global_variables module writes the proxysql configuration settings between layers. Currently this module will always report a changed state, so should typically be used with WHEN however this will change in a future version when the CHECKSUM table commands are available for all tables in proxysql.
Requirements¶
The below requirements are needed on the host that executes this module.
PyMySQL (Python 2.7 and Python 3.X), or
MySQLdb (Python 2.x)
Parameters¶
Examples¶
---
# This example saves the mysql users config from memory to disk. It uses
# supplied credentials to connect to the proxysql admin interface.
- name: Save the mysql users config from memory to disk
community.proxysql.proxysql_manage_config:
login_user: 'admin'
login_password: 'admin'
action: "SAVE"
config_settings: "MYSQL USERS"
direction: "FROM"
config_layer: "MEMORY"
# This example loads the mysql query rules config from memory to runtime. It
# uses supplied credentials to connect to the proxysql admin interface.
- name: Load the mysql query rules config from memory to runtime
community.proxysql.proxysql_manage_config:
config_file: '~/proxysql.cnf'
action: "LOAD"
config_settings: "MYSQL QUERY RULES"
direction: "TO"
config_layer: "RUNTIME"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
stdout
dictionary
|
Currently the returned value with always be changed=True. |
Simply reports whether the action reported a change.
Sample:
{'changed': True}
|
Authors¶
Ben Mildren (@bmildren)