{"id":20551730,"url":"https://github.com/do-community/ansible-role-mysql","last_synced_at":"2025-03-06T05:47:38.903Z","repository":{"id":90797350,"uuid":"125429793","full_name":"do-community/ansible-role-mysql","owner":"do-community","description":"Ansible role to set up MySQL group replication","archived":false,"fork":false,"pushed_at":"2018-03-15T21:54:31.000Z","size":7,"stargazers_count":8,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-16T17:01:02.298Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"SQLPL","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/do-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-03-15T21:47:13.000Z","updated_at":"2024-09-03T20:10:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"5514783d-cba7-49e6-9803-33091867e20c","html_url":"https://github.com/do-community/ansible-role-mysql","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fansible-role-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fansible-role-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fansible-role-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fansible-role-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/do-community","download_url":"https://codeload.github.com/do-community/ansible-role-mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242157191,"owners_count":20081037,"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":"2024-11-16T02:33:23.250Z","updated_at":"2025-03-06T05:47:38.883Z","avatar_url":"https://github.com/do-community.png","language":"SQLPL","funding_links":[],"categories":[],"sub_categories":[],"readme":"mysql\n=====\n\nA MySQL role capable of setting up group replication and integrating with ProxySQL.\n\nRequirements\n------------\n\nNo outside requirements.\n\nRole Variables\n--------------\n\n```\n# Type: boolean\n# Default: false\n# Description: Whether to install MySQL from the upstream MySQL repositories\n# instead of the distribution-provided package.\nmysql_upstream_package: true\n\n# Type: boolean\n# Default: false\n# Description: Whether to configure group replication between hosts (requires\n# `mysql_upstream_package`).\nmysql_group_replication: true\n\n# Type: boolean\n# Default: false\n# Description: Whether to configure group replication with a multi-primary\n# configuration.\nmysql_group_replication_multi_primary: true\n\n# Type: boolean\n# Default: false\n# Description: Whether to set up the requirements for ProxySQL to monitor and\n# interact with the group (requires `mysql_upstream_package` and\n# `mysql_group_replication`).\nmysql_proxysql_backend_config: true\n\n# Type: boolean\n# Default: false\n# Description: Whether to bind to private network.\nmysql_private_networking: true\n\n# Type: boolean\n# Default: false\n# Description: Whether to disallow unencrypted connections.\nmysql_repl_require_ssl: true\n\n# Type: string\n# Default: (none)\n# Description: The password to set for the MySQL `root` account.\nmysql_root_pass: adminpass\n\n# Type: string\n# Default: (none)\n# Description: The username to set for the MySQL replication user.\nmysql_repl_user: replicationuser\n\n# Type: string\n# Default: (none)\n# Description: The password to set for the MySQL replication user.\nmysql_repl_pass: replicationpass\n\n# Type: list of dictionaries\n# Default: (none)\n# Description: A list of dictionaries defining the databases to create.  Each\n# dictionary should specify the `name` of the database and optionally provide a\n# `datafile` that contains the SQL to be imported into that database.  The\n# `datafile` can be added to a `files` directory so Ansible can deploy it to\n# the hosts.\nmysql_databases:\n  - name: testdatabase\n    datafile: testdatabase.sql\n  - name: otherdatabase\n\n# Type: list of dictionaries\n# Default: (none)\n# Description: A list of dictionaries defining the users to create.  The\n# dictionaries should specify the `name`, `password`, `priv`, and `host`\n# attributes.  These values correspond directly to the `mysql_users` module.\nmysql_users:\n  - name: testuser\n    password: testpass\n    priv: \"testdatabase.*:ALL\"\n    host: \"127.0.0.1\"\n\n  - name: monitoruser\n    password: monitorpass\n    priv: \"sys.*:SELECT\"\n    host: \"%\"\n```\n\nDependencies\n------------\n\nNone\n\nExample Playbook\n----------------\n\n```\n---\n- name: Set up MySQL nodes for group replication\n  hosts: mysql_nodes\n  vars:\n    mysql_upstream_package: true\n    mysql_group_replication: true\n    mysql_group_replication_multi_primary: true\n    mysql_proxysql_backend_config: true\n    mysql_repl_require_ssl: true\n    mysql_root_pass: sammytheshark\n    mysql_repl_user: repl\n    mysql_repl_pass: replpassword\n    mysql_databases:\n      - name: \"test\"\n        datafile: \"test.sql\"\n    mysql_users:\n      - name: \"testuser\"\n        password: \"testpassword\"\n        priv: \"test.*:ALL\"\n        host: \"%\"\n  roles:\n    - role: mysql\n```\n\nLicense\n-------\n\nMIT\n\nAuthor Information\n------------------\n\nDigitalOcean Community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-community%2Fansible-role-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdo-community%2Fansible-role-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-community%2Fansible-role-mysql/lists"}