{"id":21400235,"url":"https://github.com/oefenweb/ansible-percona-toolkit","last_synced_at":"2025-07-13T21:31:06.404Z","repository":{"id":43639292,"uuid":"49513615","full_name":"Oefenweb/ansible-percona-toolkit","owner":"Oefenweb","description":"Ansible role to set up percona-toolkit in Debian-like systems","archived":false,"fork":false,"pushed_at":"2024-05-03T10:25:08.000Z","size":110,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-03T14:46:43.105Z","etag":null,"topics":["ansible","checksum","database","debian","mariadb","mysql","percona","percona-toolkit","pt-deadlock-logger","toolkit","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-12T16:34:45.000Z","updated_at":"2024-05-03T10:25:10.000Z","dependencies_parsed_at":"2023-02-08T19:15:36.314Z","dependency_job_id":"4e389464-c954-45c8-9d4b-377338892095","html_url":"https://github.com/Oefenweb/ansible-percona-toolkit","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-percona-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-percona-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-percona-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-percona-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-percona-toolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225917586,"owners_count":17544922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","checksum","database","debian","mariadb","mysql","percona","percona-toolkit","pt-deadlock-logger","toolkit","ubuntu"],"created_at":"2024-11-22T15:19:59.667Z","updated_at":"2024-11-22T15:20:00.358Z","avatar_url":"https://github.com/Oefenweb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## percona-toolkit\n\n[![CI](https://github.com/Oefenweb/ansible-percona-toolkit/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-percona-toolkit/actions?query=workflow%3ACI)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-percona--toolkit-blue.svg)](https://galaxy.ansible.com/Oefenweb/percona_toolkit)\n\nManage [percona-toolkit](https://www.percona.com/software/mysql-tools/percona-toolkit) in Debian-like systems.\n\n#### Requirements\n\n* `software-properties-common` (will be installed)\n* `dirmngr` (will be installed)\n\n#### Variables\n\n##### General\n\n* `percona_toolkit_cron_jobs`: [optional, default: `[]`]: List of job declarations\n* `percona_toolkit_cron_jobs.{n}.name`: [required]: Description of a crontab entry, should be unique, and changing the value will result in a new cron task being created (e.g. `pt-deadlock-logger`)\n* `percona_toolkit_cron_jobs.{n}.job`: [required]: The command to execute (e.g. `/usr/bin/flock -n /var/lock/percona-toolkit-heartbeat -c /usr/local/bin/pt-heartbeat-wrapper`)\n* `percona_toolkit_cron_jobs.{n}.state`: [default: `present`]: Whether to ensure the job is present or absent\n* `percona_toolkit_cron_jobs.{n}.day`: [default: `*`]: Day of the month the job should run (`1-31`, `*`, `*/2`)\n* `percona_toolkit_cron_jobs.{n}.hour`: [default: `*`]: Hour when the job should run (e.g. `0-23`, `*`, `*/2`)\n* `percona_toolkit_cron_jobs.{n}.minute`: [default: `*`]: Minute when the job should run (e.g. `0-59`, `*`, `*/2`)\n* `percona_toolkit_cron_jobs.{n}.month`: [default: `*`]: Month of the year the job should run (e.g `1-12`, `*`, `*/2`)\n* `percona_toolkit_cron_jobs.{n}.weekday`: [default: `*`]: Day of the week that the job should run (e.g. `0-6` for Sunday-Saturday, `*`)\n\n##### pt-deadlock-logger\n\n* `percona_toolkit_deadlock_logger`: [optional, default: `{}`]: pt-deadlock-logger configuration declarations\n* `percona_toolkit_deadlock_logger.defaults_file`: [optional]: Only read mysql options from the given file. You must give an absolute pathname.\n* `percona_toolkit_deadlock_logger.host`: [optional]: Host to connect to (default localhost)\n* `percona_toolkit_deadlock_logger.password`: [optional]: Password to use when connecting\n* `percona_toolkit_deadlock_logger.port`: [optional]: Port number to use for connection\n* `percona_toolkit_deadlock_logger.socket`: [optional]: Socket file to use for connection\n* `percona_toolkit_deadlock_logger.user`: [optional]: User for login if not current user\n* `percona_toolkit_deadlock_logger.daemonize`: [optional, default: `false`]: Fork to the background and detach from the shell. POSIX operating systems only.\n* `percona_toolkit_deadlock_logger.opts`: [optional, default: `[]`]: Additional options\n* `percona_toolkit_deadlock_logger.dest`: [optional]: DSN for where to store deadlocks configuration declarations\n* `percona_toolkit_deadlock_logger.dest.host`: [optional]: Host of DSN for where to store deadlocks\n* `percona_toolkit_deadlock_logger.dest.database`: [required]: Database of DSN for where to store deadlocks\n* `percona_toolkit_deadlock_logger.dest.table`: [required]: Table of DSN for where to store deadlocks\n\n##### pt-heartbeat\n\n* `percona_toolkit_heartbeat`: [optional, default: `{}`]: pt-heartbeat configuration declarations\n* `percona_toolkit_heartbeat.defaults_file`: [optional]: Only read mysql options from the given file. You must give an absolute pathname.\n* `percona_toolkit_heartbeat.host`: [optional]: Host to connect to (default localhost)\n* `percona_toolkit_heartbeat.password`: [optional]: Password to use when connecting\n* `percona_toolkit_heartbeat.port`: [optional]: Port number to use for connection\n* `percona_toolkit_heartbeat.socket`: [optional]: Socket file to use for connection\n* `percona_toolkit_heartbeat.user`: [optional]: User for login if not current user\n* `percona_toolkit_heartbeat.daemonize`: [optional, default: `false`]: Fork to the background and detach from the shell. POSIX operating systems only.\n* `percona_toolkit_heartbeat.opts`: [optional, default: `[]`]: Additional options\n\n##### pt-table-checksum\n\n* `percona_toolkit_table_checksum`: [optional, default: `{}`]: pt-table-checksum configuration declarations\n* `percona_toolkit_table_checksum.defaults_file`: [optional]: Only read mysql options from the given file. You must give an absolute pathname.\n* `percona_toolkit_table_checksum.host`: [optional]: Host to connect to (default localhost)\n* `percona_toolkit_table_checksum.password`: [optional]: Password to use when connecting\n* `percona_toolkit_table_checksum.port`: [optional]: Port number to use for connection\n* `percona_toolkit_table_checksum.socket`: [optional]: Socket file to use for connection\n* `percona_toolkit_table_checksum.user`: [optional]: User for login if not current user\n* `percona_toolkit_table_checksum.databases`: [optional]: Only checksum this list of databases (e.g. `['foo', 'bar']`)\n* `percona_toolkit_table_checksum.ignore_databases`: [optional]: Ignore this list of databases (e.g. `['information_schema', 'common_schema']`)\n* `percona_toolkit_table_checksum.opts`: [optional, default: `[]`]: Additional options\n\n##### (Custom) scripts\n\n* `percona_toolkit_script_map`: [default: `[]`]: Script declarations\n* `percona_toolkit_script_map.{n}.src`: The local path of the file to copy, can be absolute or relative (e.g. `../../../files/percona-toolkit/usr/local/bin/pt-truncate-database.sh`)\n* `percona_toolkit_script_map.{n}.dest`: The remote path of the file to copy (e.g. `/usr/local/bin/pt-truncate-database`)\n* `percona_toolkit_script_map.{n}.owner`: The name of the user that should own the file (optional, default `root`)\n* `percona_toolkit_script_map.{n}.group`: The name of the group that should own the file (optional, default `root`)\n* `percona_toolkit_script_map.{n}.mode`: The mode of the file, such as 0644 (optional, default `0755`)\n\n## Dependencies\n\nNone\n\n## Recommended\n\n* `percona-client` ([see](https://github.com/Oefenweb/ansible-percona-client))\n* `percona-server` ([see](https://github.com/Oefenweb/ansible-percona-server))\n\n#### Example(s)\n\n##### Simple\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.percona-toolkit\n```\n\n##### Create jobs\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.percona-toolkit\n  vars:\n    percona_toolkit_cron_jobs:\n      - name: pt-deadlock-logger\n        job: '/usr/bin/flock -n /var/lock/percona-toolkit-deadlock-logger -c /usr/local/bin/pt-deadlock-logger-wrapper'\n        minute: 0\n        hour: 0\n      - name: pt-heartbeat\n        job: '/usr/bin/flock -n /var/lock/percona-toolkit-heartbeat -c /usr/local/bin/pt-heartbeat-wrapper'\n        minute: 0\n        hour: 0\n      - name: pt-table-checksum\n        job: '/usr/bin/flock -n /var/lock/percona-toolkit-table-checksum -c /usr/local/bin/pt-table-checksum-wrapper'\n        minute: 0\n        hour: 0\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\n* Mark van Driel\n* Mischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-percona-toolkit/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-percona-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-percona-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-percona-toolkit/lists"}