proxysql_scheduler – Adds or removes schedules from proxysql admin interface¶
The proxysql_scheduler module adds or removes schedules using the proxysql admin interface.
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)
--- # 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
Common return values are documented here, the following are the fields unique to this module: