We recently made a number of enhancements to the ClusterControl Ansible Role, so it now also supports automatic deployment of MySQL-based systems (MySQL Replication, Galera Cluster, NDB Cluster). The updated role uses the awesome ClusterControl RPC interface to automate deployments. It is available at Ansible Galaxy and Github.
TLDR; It is now possible to define your database clusters directly in a playbook (see below example), and let Ansible and ClusterControl automate the entire deployment:
cc_cluster:
- deployment: true
operation: "create"
cluster_type: "galera"
mysql_hostnames:
- "192.168.1.101"
- "192.168.1.102"
- "192.168.1.103"
mysql_password: "MyPassword2016"
mysql_port: 3306
mysql_version: "5.6" …[Read more]