An open API service indexing awesome lists of open source software.

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

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}
```