Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 964 Bytes

README.md

File metadata and controls

50 lines (37 loc) · 964 Bytes

opichon.docker-mysql

An Ansible role to run a MySQL server as a docker container.

See also opichon.mysql-backup

Requirements

This role requires Ansible 1.2 or higher.

It also requires the Docker engine to run on the target host.

Role variables

Ansible variables are listed below 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

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

MIT