opichon.docker-mysql
opichon.docker-mysql
This is an Ansible role that helps you run a MySQL server inside a Docker container.
Check out opichon.mysql-backup for more information on backing up your MySQL database.
Requirements
To use this role, you need Ansible version 1.2 or higher.
You also need the Docker engine installed and running on the machine where you want to use this role.
Role variables
Here are the Ansible variables you can configure, along with their default values:
mysql_backups_dir: /var/mysql/backups
mysql_character_set: utf8mb4
mysql_collation: utf8mb4_unicode_520_ci
mysql_conf_dir: /var/mysql/conf.d
mysql_container_name: mysql
mysql_lib_dir: /var/mysql/lib
mysql_network: mysql
mysql_password
mysql_port: 3306
mysql_root_password
mysql_state: started
Example playbook
Here’s an example of how to use the role in a playbook:
---
- hosts: servers
roles:
- opichon.docker-mysql
mysql_env:
MYSQL_DATABASE: mydb
MYSQL_USER: me
MYSQL_PASSWORD: secret
mysql_database: mydb
mysql_network: default
mysql_root_password: very_secret
License
This project is licensed under the MIT License.
Installa
ansible-galaxy install opichon.docker-mysql
Licenza
mit
Download
2.4k
Proprietario
Entrepreneur & CTO
Since 2003, I have helped SMEs and startups in all their IT-related needs.