Setting up galera cluster, also have new strategy for internal ips

This commit is contained in:
2016-02-02 15:02:08 -05:00
parent 8a55e9f946
commit d0840d63ce
7 changed files with 147 additions and 36 deletions

View File

@@ -21,14 +21,8 @@
- name: Install python module
apt: name=python-mysqldb state=installed
- name: Create replication account
mysql_user: name=repl host="%" password={{ replication_password }} priv=*.*:"REPLICATION SLAVE" state=present
- name: Create readwrite user
mysql_user: name=rwuser host="%" password={{ read_write_password }} priv=*.*:SELECT,INSERT,UPDATE,DELETE,CREATE,DROP state=present
- name: Modify configuration file to listen on all interfaces
lineinfile: dest=/etc/mysql/my.cnf regexp="^bind-address" line="bind-address=0.0.0.0"
- name: Replace config file
template: src=my.cnf.j2 dest=/etc/mysql/my.cnf
- name: Stop mysql service
service: name=mysql state=stop