2 - name: install python-mysqldb
3 apt: name={{ item }} state=present force=yes
13 - name: create mysql log directy
14 file: path=/var/log/mysql state=directory owner=mysql group=mysql mode=0755
16 - name: update mariadb my.cnf
17 template: src=my.cnf dest=/etc/mysql/my.cnf backup=yes
19 - name: update galera wsrep.cnf
20 template: src=wsrep.cnf dest=/etc/mysql/conf.d/wsrep.cnf backup=yes
22 - name: update wsrep_sst_rsync uid
23 lineinfile: dest=/usr/bin/wsrep_sst_rsync state=absent regexp="\s*uid = \$MYUID$" backup=yes
25 - name: update wsrep_sst_rsync gid
26 lineinfile: dest=/usr/bin/wsrep_sst_rsync state=absent regexp="\s*gid = \$MYGID$" backup=yes
28 - name: manually restart mysql server
29 service: name=mysql state=restarted enabled=yes
37 - name: generate mysql service list
38 shell: echo {{ item }} >> /opt/service
42 - name: create database/user
44 when: HA_CLUSTER[inventory_hostname] == ''