https://github.com/angristan/ansible-mysql
Ansible role for MySQL/MariaDB
https://github.com/angristan/ansible-mysql
ansible debian mariadb mysql ubuntu
Last synced: 2 months ago
JSON representation
Ansible role for MySQL/MariaDB
- Host: GitHub
- URL: https://github.com/angristan/ansible-mysql
- Owner: angristan
- License: mit
- Created: 2019-02-15T00:10:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T17:24:35.000Z (about 6 years ago)
- Last Synced: 2026-03-30T05:39:37.782Z (3 months ago)
- Topics: ansible, debian, mariadb, mysql, ubuntu
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible role for MySQL
This is a simple role that will install MariaDB and handle users, databases and configuration.
The role should work on all Debian-based distributions.
## Installation
Add this to your `requirements.yml`:
```yml
- src: https://github.com/angristan/ansible-mysql
```
## Sample playbook
```yaml
---
- hosts: myhost
roles:
- name: mysql
tags: mysql
vars:
mysql_databases:
- name: blog
- name: forum
mysql_users:
- name: blog
password: "{{ vault_mysql_password_blog }}"
priv: 'blog.*:ALL'
- name: forum
password: "{{ vault_mysql_password_forum }}"
priv: 'forum.*:ALL'
mysql_options:
- {section: mysqld, option: bind-address, value: 0.0.0.0}
- {section: mysqld, option: innodb_buffer_pool_size, value: 1G}
- {section: mysqld, option: innodb_io_capacity, value: 4000}
```