{"id":27088984,"url":"https://github.com/devops-works/ansible-proxysql","last_synced_at":"2025-04-06T06:37:12.218Z","repository":{"id":36380313,"uuid":"210313046","full_name":"devops-works/ansible-proxysql","owner":"devops-works","description":"Ansible proxysql role","archived":false,"fork":false,"pushed_at":"2022-12-08T06:37:42.000Z","size":54,"stargazers_count":5,"open_issues_count":5,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-10T21:43:31.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devops-works.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-23T09:16:25.000Z","updated_at":"2023-03-02T21:59:57.000Z","dependencies_parsed_at":"2023-01-17T00:57:59.385Z","dependency_job_id":null,"html_url":"https://github.com/devops-works/ansible-proxysql","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-proxysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-proxysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-proxysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devops-works%2Fansible-proxysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devops-works","download_url":"https://codeload.github.com/devops-works/ansible-proxysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445686,"owners_count":20939953,"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":[],"created_at":"2025-04-06T06:37:11.702Z","updated_at":"2025-04-06T06:37:12.204Z","avatar_url":"https://github.com/devops-works.png","language":"Jinja","readme":"# ProxySQL Ansible role\n\n[![Build Status](https://travis-ci.org/leucos/ansible-proxysql.svg?branch=master)](https://travis-ci.org/leucos/ansible-proxysql)\n\nThis role will install proxysql on Ubuntu Xenial (16.04) \u0026 Bionic\n(18.04) from [sysown\nrelease](https://github.com/sysown/proxysql/releases).\n\n## Requirements\n\nTested on 2.5.0. Should work on 2.3+\n\n## Role Handlers\n\n| Name                     | Type    | Description                                                                 |\n| ------------------------ | ------- | --------------------------------------------------------------------------- |\n| Restart proxysql normal  | service | Restarts proxysql using service (SysV based) when proxysql_initial is False |\n| Restart proxysql initial | command | Restarts proxysql in initial mode when proxysql_initial is True             |\n| Restart proxysql         | Virtual | Calls all above handlers                                                    |\n\n## Tags\n\n| Name     | Description           |\n| -------- | --------------------- |\n| proxysql | Applies to whole role |\n\n\n## Role Variables\n\n| Name                       | Default   | Type   | Description                                                       |\n| -----                      | -------   | ------ | -----------                                                       |\n| proxysql_admin_user        | admin     | String | Username for ProxySQL admin                                       |\n| proxysql_admin_password    | admin     | String | Password for the above user                                       |\n| proxysql_admin_interface   | 127.0.0.1 | String | Bind address for admin interface                                  |\n| proxysql_admin_port        | 6032      | Number | Bind port for administrative interface                            |\n| proxysql_initial           | False     | Bool   | Wipes existing config database when True (see --initial CLI flag) |\n| proxysql_mysql_interface   | 127.0.0.1 | String | MySQL bind interface                                              |\n| proxysql_mysql_port        | 6033      | Number | MySQL bind port                                                   |\n| proxysql_mysql_query_rules | []        | Array  | Configuration-file query rules                                    |\n| proxysql_mysql_servers     | []        | Array  | Configuration-file servers                                        |\n| proxysql_mysql_users       | []        | Array  | Configuration-file users                                          |\n\nIf you don't want to list `proxy_mysql_servers` in variables, you can\nset `proxy_mysql_servers_group` instead. The rolle will populate\nmysql_servers from the group name.\n\nHowever, in this case, be sure to set the following variables for _each\nserver_ in the group:\n\n| Name                              | Default | Type   | Description                                         |\n| -----                             | ------- | ------ | --------------------------------------------        |\n| proxysql_upstream_mysql_interface | false   | String | Interface **name** upstream MySQL server listens on |\n| proxysql_upstream_mysql_port      | 3306    | String | Port upstream MySQL listens on                     |\n| proxysql_hostgroup                | false   | Number | Hostgroup this MySQL server belongs to              |\n\nNote that you can not use both `proxy_mysql_servers_group` and\n`proxy_mysql_servers` at the same time !\n\nWhen using cluster mode, the following variables must be set:\n\n| Name                           | Default | Type   | Description                                       |\n| -----                          | ------- | ------ | --------------------------------------------      |\n| proxysql_cluster_name          | false   | String | ProxySQL name                                     |\n| proxysql_cluster_password      | false   | String | ProxySQL password for cluster communications      |\n| proxysql_cluster_servers_group | false   | String | Ansible group containing ProxySQL cluster members |\n\n## Example\n\n### Requirements\n\n```yaml\n- src: git+ssh://git@github.com/leucos/ansible-proxysql.git\n  version: origin/master\n```\n_Use a fixed tag instead of origin/master if possible_\n\n### Playbook\n\n```yaml\n- hosts: proxylb\n  roles:\n    - role-proxysql\n```\n\n### Inventory\n\n```yaml\nproxysql_mysql_query_rules:\n  - match_pattern: \"^SELECT .* FOR UPDATE$\"\n    destination_hostgroup: 0\n  - match_pattern: \"^SELECT\"\n    destination_hostgroup: 1\n\nproxysql_mysql_servers:\n   - address: 1.2.3.4\n     port: 3306\n     hostgroup: 0\n   - address: 5.6.7.8\n     port: 3306\n     hostgroup: 1\n```\n\n## Tests\n\nTo run tests locally in a Vagrant machine, just hit:\n\n```bash\nvagrant up\nvagrant ssh -c specs\n```\n\nIf you want to run the test playbook fast (i.e., without re-installing Ansible),\njust run:\n\n```bash\nvagrant ssh -c 'specs -p'\n```\n\n## Notes\n\nThis role follows [Semantic Versionning](http://semver.org/)\nconventions.\n\nBesides proxysql, the `mysql-common` package will be installed by this role.\n\n## License\n\nMIT\n\n## Author Information\n\n@leucos\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-works%2Fansible-proxysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevops-works%2Fansible-proxysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevops-works%2Fansible-proxysql/lists"}