{"id":22845437,"url":"https://github.com/idealista/mysql_role","last_synced_at":"2025-06-21T05:06:49.558Z","repository":{"id":43707316,"uuid":"84809912","full_name":"idealista/mysql_role","owner":"idealista","description":"Ansible role to install MySQL Community Server","archived":false,"fork":false,"pushed_at":"2025-05-22T11:40:25.000Z","size":262,"stargazers_count":23,"open_issues_count":1,"forks_count":13,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-22T12:37:23.071Z","etag":null,"topics":["ansible","debian","mysql","mysql-database","mysql-server"],"latest_commit_sha":null,"homepage":"","language":"YAML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idealista.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2017-03-13T09:48:45.000Z","updated_at":"2024-12-12T08:37:48.000Z","dependencies_parsed_at":"2025-04-28T16:46:40.548Z","dependency_job_id":"f59576ce-9b81-4759-bd17-226c8e01ce32","html_url":"https://github.com/idealista/mysql_role","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/idealista/mysql_role","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fmysql_role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fmysql_role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fmysql_role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fmysql_role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idealista","download_url":"https://codeload.github.com/idealista/mysql_role/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idealista%2Fmysql_role/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261066548,"owners_count":23104770,"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","debian","mysql","mysql-database","mysql-server"],"created_at":"2024-12-13T03:17:14.956Z","updated_at":"2025-06-21T05:06:44.546Z","avatar_url":"https://github.com/idealista.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/idealista/mysql_role/master/logo.gif)\n\n# MySQL Ansible role\n\n[![Build Status](https://travis-ci.org/idealista/mysql_role.png)](https://travis-ci.org/idealista/mysql_role)\n[![Ansible Galaxy](https://img.shields.io/badge/galaxy-idealista.mysql__role-B62682.svg)](https://galaxy.ansible.com/idealista/mysql_role)\n\nThis ansible role installs an Oracle MySQL or MariaDB server in a debian environment.\n\n- [Getting Started](#getting-started)\n\t- [Prerequisities](#prerequisities)\n\t- [Installing](#installing)\n- [Usage](#usage)\n- [Testing](#testing)\n- [Built With](#built-with)\n- [Versioning](#versioning)\n- [Authors](#authors)\n- [License](#license)\n- [Contributing](#contributing)\n\n## Getting Started\n\nThese instructions will get you a copy of the role for your Ansible playbook. Once launched, it will install an [MySQL Database](https://www.mysql.com/) or [MariaDB server](https://mariadb.org/) in a Debian system.\n\n### Prerequisities\n\nAnsible \u003e= 2.9 version installed.\nInventory destination should be a Debian environment.\n\nFor testing purposes, [Molecule](https://molecule.readthedocs.io/) with Docker as driver and [Goss](https://goss.rocks/) as verifier.\n\n### Installing\n\nCreate or add to your roles dependency file (e.g requirements.yml):\n\n```\n- src: idealista.mysql_role\n  version: 4.5.0\n  name: mysql\n```\n\nInstall the role with ansible-galaxy command:\n\n```\nansible-galaxy install -p roles -r requirements.yml -f\n```\n\nUse in a playbook:\n\n```\n---\n- hosts: someserver\n  roles:\n    - role: mysql\n```\n\n## Usage\n\n\nInstallation tasks follows the install guide: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/\n\nLook to the [defaults](defaults/main.yml) properties file to see the possible configuration properties.\n\nSet at least mysql_root_user and mysql_root_password:\n\n```yaml\nmysql_root_user: mysql         # Change mysql root user\nmysql_root_password: secret    # Change mysql root password\n```\n\nAdd any number of databases and create users with privs on them\n\n```yaml\nmysql_databases:\n   - name: example_DB\n     encoding: utf8\n   - name: anotherExample_DB\n\nmysql_users:\n   - name: admin_user\n     host: 127.0.0.1\n     password: secret\n     priv: [ *.*:USAGE ]\n   - name: example_user\n     host: *\n     password: secret\n     priv: [ example_DB.*:ALL ]\n```\n\n### Selecting a major release version\n\nMajor releases of MySQL can be selected using `mysql_server_version`. You can see the available options in the MySQL Debian mirror.\n\n## Testing\n\n```\n$ pipenv sync\n$ pipenv run molecule test --all\n```\n\nTo check the installation, example with Oracle's MySQL implementation:\n\n```bash\n$ pipenv run molecule converge --scenario-name=mysql\n$ pipenv run molecule login --scenario-name=mysql\n\nroot@mysql:/# mysql -u root -ptesting\n\nmysql\u003e show databases;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| test01             |\n| performance_schema |\n+--------------------+\n4 rows in set (0.00 sec)\n```\n\n ## Known Issues\n  There is a problem while trying to remount /run using the role. If you need to assign a new size for mysql use this in your playbook\n```yaml\n- name: MySQL | Remounting /run\n  shell: mount -t tmpfs tmpfs /run -o remount,size={{ mysql_remount_run_partition_size }}\n  changed_when: false\n  tags:\n    skip_ansible_lint\n  when: mysql_remount_run\n```\n\n\n## Built With\n\n![Ansible](https://img.shields.io/badge/ansible-5.2.0-green.svg)\n![Molecule](https://img.shields.io/badge/molecule-3.4.2-green.svg)\n![Goss](https://img.shields.io/badge/goss-0.3.16-green.svg)\n\n## Versioning\n\nFor the versions available, see the [tags on this repository](https://github.com/idealista/mysql_role/tags).\n\nAdditionaly you can see what change in each version in the [CHANGELOG.md](CHANGELOG.md) file.\n\n## Authors\n\n* **Idealista** - *Work with* - [idealista](https://github.com/idealista)\n\nSee also the list of [contributors](https://github.com/idealista/mysql_role/contributors) who participated in this project.\n\n## License\n\n![Apache 2.0 License](https://img.shields.io/hexpm/l/plug.svg)\n\nThis project is licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealista%2Fmysql_role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidealista%2Fmysql_role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidealista%2Fmysql_role/lists"}