ansible / ansible.builtin / v2.4.0.0-1 / module / proxysql_scheduler Adds or removes schedules from proxysql admin interface. | "added in version" 2.3 of ansible.builtin" Authors: Ben Mildren (@bmildren) stableinterface | supported by communityansible.builtin.proxysql_scheduler (v2.4.0.0-1) — module
pip
Install with pip install ansible==2.4.0.0.post1
The M(proxysql_scheduler) module adds or removes schedules using the proxysql admin interface.
--- # This example adds a schedule, it saves the scheduler config to disk, but # avoids loading the scheduler config to runtime (this might be because # several servers are being added and the user wants to push the config to # runtime in a single batch using the M(proxysql_manage_config) module). It # uses supplied credentials to connect to the proxysql admin interface. - proxysql_scheduler: login_user: 'admin' login_password: 'admin' interval_ms: 1000 filename: "/opt/maintenance.py" state: present load_to_runtime: False
# This example removes a schedule, saves the scheduler config to disk, and # dynamically loads the scheduler config to runtime. It uses credentials # in a supplied config file to connect to the proxysql admin interface. - proxysql_scheduler: config_file: '~/proxysql.cnf' filename: "/opt/old_script.py" state: absent
arg1: description: - Argument that can be passed to the job. arg2: description: - Argument that can be passed to the job. arg3: description: - Argument that can be passed to the job. arg4: description: - Argument that can be passed to the job. arg5: description: - Argument that can be passed to the job. state: choices: - present - absent default: present description: - When C(present) - adds the schedule, when C(absent) - removes the schedule. active: default: true description: - A schedule with I(active) set to C(False) will be tracked in the database, but will be never loaded in the in-memory data structures. comment: description: - Text field that can be used for any purposed defined by the user. filename: description: - Full path of the executable to be executed. required: true login_host: default: 127.0.0.1 description: - The host used to connect to ProxySQL admin interface. login_port: default: 6032 description: - The port used to connect to ProxySQL admin interface. login_user: default: None description: - The username used to authenticate to ProxySQL admin interface. config_file: default: '' description: - Specify a config file from which login_user and login_password are to be read. interval_ms: default: 10000 description: - How often (in millisecond) the job will be started. The minimum value for I(interval_ms) is 100 milliseconds. force_delete: default: false description: - By default we avoid deleting more than one schedule in a single batch, however if you need this behaviour and you're not concerned about the schedules deleted, you can set I(force_delete) to C(True). save_to_disk: default: true description: - Save mysql host config to sqlite db on disk to persist the configuration. login_password: default: None description: - The password used to authenticate to ProxySQL admin interface. load_to_runtime: default: true description: - Dynamically load mysql host config to runtime memory.
stdout: description: The schedule modified or removed from proxysql returned: On create/update will return the newly modified schedule, on delete it will return the deleted record. sample: changed: true filename: /opt/test.py msg: Added schedule to scheduler schedules: - active: '1' arg1: null arg2: null arg3: null arg4: null arg5: null comment: '' filename: /opt/test.py id: '1' interval_ms: '10000' state: present type: dict