├── README.md ├── defaults └── main.yml ├── handlers └── main.yml ├── meta └── main.yml ├── tasks ├── backup.yml ├── check_vars.yml ├── client.yml ├── main.yml └── pxc.yml └── templates ├── backup_all_databases.j2 ├── charset.cnf.j2 ├── datadog_mysql.yaml.j2 ├── ferm.j2 ├── logrotate.j2 ├── root_my.cnf.j2 ├── variables.inc └── wsrep.cnf.j2 /README.md: -------------------------------------------------------------------------------- 1 | Percona server deployment 2 | ========================= 3 | 4 | Percona playbook deployement 5 | 6 | This role will let you install a Percona server. 7 | 8 | Requirements 9 | ------------ 10 | 11 | MySQLdb python package (required by `mysql_*` Ansible modules) 12 | 13 | Role Variables 14 | -------------- 15 | 16 | Very few variables are in this role for now. It will grow as needed. 17 | 18 | - `mysql_backup`: whether a regulard `mysqldump` should be made (default: unset) 19 | 20 | `mysql_backup`: 21 | `crontime`: [cronentry] cron entry that triggers the backup 22 | `keep`: [number] how many backups do we keep 23 | `destination`: [destination] directory in the filesystem to put backups in 24 | `s3bucket`: [bucketaddess] when defined, this will trigger a copy of backuped files to an S3 bucket 25 | 26 | - `mysql_users`: list of users and privileges to add besides root (see `mysql_user` for reference; default: []) 27 | 28 | `mysql_users`: 29 | - { user: , 30 | password: "", 31 | priv="", # (e.g. "*.*:ALL") 32 | host="" # (host from which user connects) 33 | } 34 | 35 | - `mysql_bind_address`: bind address (default: "127.0.0.1") 36 | - `mysql_key_buffer`: buffer size for keys (default: "16M") 37 | - `mysql_php5`: should we install mysql php5 extensions (default: false) 38 | - `mysql_root_password`: root password (default: "changeme") 39 | 40 | - `percona_version`: major.minor version to install (defaumt: "5.6") 41 | 42 | Usage 43 | ----- 44 | 45 | The role is supposed to be used this way from a playbook: 46 | 47 | - { role: leucos.mysql } 48 | 49 | Dependencies 50 | ------------ 51 | 52 | This role depends on: 53 | - [leucos.s3cmd](https://github.com/leucos/ansible-s3cmd) when S3 backup is enabled 54 | 55 | License 56 | ------- 57 | 58 | MIT 59 | 60 | Author Information 61 | ------------------ 62 | 63 | [@leucos](https://github.com/leucos) 64 | -------------------------------------------------------------------------------- /defaults/main.yml: -------------------------------------------------------------------------------- 1 | # pxc_backup: 2 | # crontime: [cronentry] cron entry that triggers the backup 3 | # keep: [number] how many backups do we keep 4 | # destination: [destination] directory in the filesystem to put backups in 5 | # s3bucket: [bucketaddess] when defined, this will trigger a 6 | # sync from pxc_backup.destination to s3 bucket 7 | # 8 | # pxc_users: 9 | # - { user: foo, 10 | # password: "bar", 11 | # priv="*.*:ALL" 12 | # host="somehost" } 13 | 14 | # pxc_backup: are we doing backups ? 15 | pxc_backup: false 16 | # pxc_backup_destination: where do we store local backups 17 | pxc_backup_destination: /tmp 18 | # pxc_backup_keep: how many backups do we keep 19 | pxc_backup_keep: 30 20 | # pxc_backup_s3bucket: when defined, this will trigger a sync from 21 | # pxc_backup_destination to s3 bucket 22 | pxc_backup_s3bucket: "" 23 | # pxc_backup_gcloudbucket: when defined, this will trigger a sync from 24 | # pxc_backup_destination to gcloud bucket 25 | pxc_backup_gcloudbucket: "" 26 | 27 | # which interface do we bind for general mysql daemon 28 | pxc_bind_interface: "eth1" 29 | 30 | # which interface do we bind for cluster communications 31 | pxc_cluster_bind_interface: "{{ pxc_bind_interface }}" 32 | 33 | # Define ansible cluster group somewhere 34 | pxc_cluster_group: false 35 | pxc_cluster_name: my_pxc_cluster 36 | # Set primary inventory_hostame 37 | pxc_cluster_primary: false 38 | pxc_cluster_sst_password: bar 39 | pxc_cluster_sst_user: foo 40 | 41 | pxc_datadog_user: false 42 | pxc_datadog_password: false 43 | 44 | # Binary log expire 45 | pxc_expire_log_days: 8 46 | 47 | # Allowed list for 3306 port access 48 | # This can contain ansible group names, ansible host names or IPs 49 | # Not that the role needs facts for hosts and groups to be gathered 50 | # It won't do it for you 51 | pxc_filter_allow_mysql_port: false 52 | pxc_innodb_large_prefix: false 53 | 54 | pxc_max_allowed_packet: 4194304 55 | 56 | # Datadir 57 | pxc_datadir: /var/lib/mysql 58 | 59 | pxc_root_password: "changeme" 60 | 61 | pxc_strict_mode: PERMISSIVE 62 | 63 | pxc_version: "5.6" 64 | -------------------------------------------------------------------------------- /handlers/main.yml: -------------------------------------------------------------------------------- 1 | # - name: Restart pxc 2 | # service: name=mysql state=restarted 3 | # run_once: true 4 | # with_items: play_hosts 5 | # delegate_to: "{{ item }}" 6 | 7 | - name: Restart pxc cluster 8 | debug: msg="Trying to restart cluster with 'Restart pxc cluster safe'" 9 | changed_when: true 10 | notify: 11 | - Restart pxc cluster safe 12 | - Bootstrap pxc primary 13 | 14 | # - name: Bootstrap pxc cluster 15 | # debug: msg="Bootstrapping primary then restarting nodes" 16 | # changed_when: true 17 | # notify: 18 | # - Bootstrap pxc primary 19 | 20 | - name: Bootstrap pxc primary 21 | command: service mysql bootstrap-pxc 22 | when: inventory_hostname == pxc_cluster_primary 23 | notify: 24 | - Restart pxc non primary 25 | 26 | - name: Restart pxc non primary 27 | service: name=mysql state=restarted 28 | when: item != pxc_cluster_primary 29 | run_once: true 30 | ignore_errors: true 31 | with_items: "{{ play_hosts }}" 32 | delegate_to: "{{ item }}" 33 | 34 | - name: Restart pxc cluster safe 35 | service: name=mysql state=started 36 | run_once: true 37 | ignore_errors: true 38 | with_items: "{{ play_hosts }}" 39 | delegate_to: "{{ item }}" 40 | register: __pxc_restart_cluster_failed 41 | when: not __pxc_installed is changed 42 | -------------------------------------------------------------------------------- /meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | author: Michel Blanc 4 | description: Percona Xtra DB cluster 5 | company: devops.works 6 | license: MIT 7 | min_ansible_version: 1.9 8 | 9 | platforms: 10 | - name: Ubuntu 11 | versions: 12 | - trusty 13 | - name: Debian 14 | versions: 15 | - wheezy 16 | 17 | categories: 18 | - database 19 | 20 | dependencies: [] 21 | -------------------------------------------------------------------------------- /tasks/backup.yml: -------------------------------------------------------------------------------- 1 | ## 2 | # MySQL DB dumping. 3 | # 4 | # 5 | - name: Installs backup script 6 | template: 7 | src: "../templates/backup_all_databases.j2" 8 | dest: /usr/local/bin/backup_all_databases 9 | mode: 0700 10 | 11 | - name: Ensures backup destination exists 12 | file: 13 | path: "{{ pxc_backup_destination }}" 14 | state: directory 15 | owner: root 16 | 17 | - name: Adds backup crontab entry 18 | cron: 19 | name: Backups all databases 20 | job: /usr/local/bin/backup_all_databases > /var/log/pxcbackup.log 2>&1 21 | user: root 22 | day: "{{ pxc_backup_cron_day }}" 23 | hour: "{{ pxc_backup_cron_hour }}" 24 | minute: "{{ pxc_backup_cron_minute }}" 25 | tags: ["cron"] 26 | -------------------------------------------------------------------------------- /tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | - name: Checking that required variables are set 2 | fail: msg="{{ item }} is not defined" 3 | when: not item 4 | with_items: 5 | - pxc_cluster_group 6 | - pxc_cluster_primary 7 | - pxc_filter_allow_mysql_port 8 | 9 | - name: Checking that pxc_cluster_primary is in pxc_cluster_group 10 | fail: 11 | msg: "CHECK ERROR: {{ pxc_cluster_primary }} is not in group {{ pxc_cluster_group }}" 12 | when: pxc_cluster_primary not in groups[pxc_cluster_group] 13 | 14 | -------------------------------------------------------------------------------- /tasks/client.yml: -------------------------------------------------------------------------------- 1 | - name: Installs percona client libs 2 | apt: pkg={{ item }} state=installed 3 | with_items: 4 | - libperconaserverclient18.1 5 | - percona-server-client 6 | - libperconaserverclient18.1-dev 7 | 8 | 9 | -------------------------------------------------------------------------------- /tasks/main.yml: -------------------------------------------------------------------------------- 1 | - include: check_vars.yml 2 | tags: ["pxc","pxc:install"] 3 | 4 | - include: pxc.yml 5 | tags: ["pxc","pxc:install"] 6 | 7 | - include: backup.yml 8 | tags: ["pxc","pcx:backup","backup"] 9 | when: pxc_backup is defined and pxc_backup 10 | -------------------------------------------------------------------------------- /tasks/pxc.yml: -------------------------------------------------------------------------------- 1 | ## 2 | # Percona database setup. 3 | # 4 | # 5 | 6 | - name: Adds percona key 7 | apt_key: 8 | keyserver: keys.gnupg.net 9 | id: "{{ item }}" 10 | state: present 11 | with_items: 12 | - E1E2CD202D607DAF 13 | - 1C4CBDCDCD2EFD2A 14 | - 9334A25F8507EFA5 15 | - 9E003FA64CAC6D72 16 | tags: ["pxc:keys"] 17 | 18 | - name: Adds percona repositories 19 | apt_repository: 20 | repo: 'deb http://repo.percona.com/apt {{ ansible_distribution_release }} main' 21 | state: present 22 | 23 | - name: Sets root password 24 | debconf: 25 | name: "percona-xtradb-cluster-{{ pxc_version|replace('.','') }}" 26 | question: "{{ item }}" 27 | value: "{{ pxc_root_password }}" 28 | vtype: 'password' 29 | changed_when: false 30 | with_items: 31 | - 'root_password' 32 | - 'root_password_again' 33 | 34 | - name: Sets root password again 35 | debconf: 36 | name: "percona-xtradb-cluster-server-{{ pxc_version }}" 37 | question: "percona-xtradb-cluster-server/{{ item }}" 38 | value: "{{ pxc_root_password }}" 39 | vtype: 'password' 40 | changed_when: false 41 | with_items: 42 | - 'root_password' 43 | - 'root_password_again' 44 | 45 | - name: Configures for easy access as root user 46 | template: 47 | src: "../templates/root_my.cnf.j2" 48 | dest: /root/.my.cnf 49 | 50 | - name: Adds ferm filtering 51 | template: 52 | src: "../templates/ferm.j2" 53 | dest: /etc/ferm/filter-input.d/60_mysql.conf 54 | when: ferm_enabled | default(false) 55 | tags: ["ferm"] 56 | notify: Restart ferm 57 | 58 | - name: Installs percona-server 59 | apt: 60 | pkg: "percona-xtradb-cluster-{{ pxc_version|replace('.','') }}" 61 | state: present 62 | register: __pxc_installed 63 | notify: Restart pxc non primary 64 | 65 | - name: Installs additional tools 66 | apt: 67 | pkg: 68 | - sysbench 69 | - python-mysqldb 70 | state: latest 71 | 72 | - name: Installs additional tools for 5.6 73 | apt: 74 | pkg: 75 | - percona-xtrabackup 76 | - percona-toolkit 77 | state: latest 78 | when: pxc_version|version_compare('5.7','<') 79 | 80 | # We have to ignore errors so we can recover from cluster failuer and try to 81 | # bootstrap it again 82 | - name: Adds replication user 83 | mysql_user: 84 | priv: "*.*:GRANT,RELOAD,REPLICATION CLIENT,LOCK TABLES,PROCESS" 85 | user: "{{ pxc_cluster_sst_user }}" 86 | password: "{{ pxc_cluster_sst_password }}" 87 | host: localhost 88 | ignore_errors: true 89 | when: inventory_hostname == pxc_cluster_primary 90 | 91 | - name: Creates monitoring user 92 | mysql_user: 93 | name: "{{ pxc_monitoring_user }}" 94 | password: "{{ pxc_monitoring_password }}" 95 | priv: "*.*:REPLICATION CLIENT,PROCESS" 96 | host: "{{ item }}" 97 | state: present 98 | when: pxc_monitoring_user is defined and pxc_monitoring_user and pxc_monitoring_password is defined and pxc_monitoring_password 99 | with_items: 100 | - localhost 101 | - 127.0.0.1 102 | tags: ["pxc","pxc:client","pcx:monitoring"] 103 | 104 | - name: Stop all instances 105 | service: name=mysql state=stopped 106 | when: __pxc_installed is changed 107 | 108 | - name: Adds mysql charset config 109 | template: 110 | src: "{{ item }}.j2" 111 | dest: "/etc/mysql/conf.d/zz_local_{{ item }}" 112 | backup: yes 113 | with_items: 114 | - charset.cnf 115 | notify: Restart pxc cluster 116 | tags: ["pxc:config"] 117 | 118 | - name: Adds pxc config 119 | template: 120 | src: "{{ item }}.j2" 121 | dest: "/etc/mysql/percona-xtradb-cluster.conf.d/zz_local_{{ item }}" 122 | backup: yes 123 | with_items: 124 | - wsrep.cnf 125 | notify: Restart pxc cluster 126 | tags: ["pxc:config"] 127 | 128 | - name: Adds logrotate config 129 | template: 130 | src: "../templates/logrotate.j2" 131 | dest: "/etc/logrotate.d/percona-xtradb-cluster-server-{{ pxc_version }}" 132 | tags: ["pxc:config"] 133 | 134 | # - name: Deletes anonymous MySQL server user for ansible_fqdn 135 | # mysql_user: > 136 | # user="" host="{{ ansible_fqdn }}" 137 | # state="absent" 138 | # when: inventory_hostname == pxc_cluster_primary 139 | # 140 | # - name: Deletes anonymous MySQL server user for localhost 141 | # mysql_user: > 142 | # user="" 143 | # state="absent" 144 | # when: inventory_hostname == pxc_cluster_primary 145 | # 146 | # - name: Secures the MySQL root user for IPV6 localhost (::1) 147 | # mysql_user: > 148 | # user="root" 149 | # password="{{ pxc_root_password }}" 150 | # host="::1" 151 | # when: inventory_hostname == pxc_cluster_primary 152 | # 153 | # 154 | # - name: Secures the MySQL root user for IPV4 localhost (127.0.0.1) 155 | # mysql_user: > 156 | # user="root" 157 | # password="{{ pxc_root_password }}" 158 | # host="127.0.0.1" 159 | # when: inventory_hostname == pxc_cluster_primary 160 | # 161 | # - name: Secures the MySQL root user for localhost domain (localhost) 162 | # mysql_user: > 163 | # user="root" 164 | # password="{{ pxc_root_password }}" 165 | # host="localhost" 166 | # when: inventory_hostname == pxc_cluster_primary 167 | # 168 | # - name: Secures the MySQL root user for server_hostname domain 169 | # mysql_user: > 170 | # user="root" 171 | # password="{{ pxc_root_password }}" 172 | # host="{{ ansible_fqdn }}" 173 | # when: inventory_hostname == pxc_cluster_primary 174 | # 175 | # - name: Removes the MySQL test database 176 | # mysql_db: > 177 | # db=test 178 | # state=absent 179 | # 180 | -------------------------------------------------------------------------------- /templates/backup_all_databases.j2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # {{ ansible_managed }} 5 | # 6 | 7 | # How many backups to keep 8 | KEEP={{ pxc_backup_keep }} 9 | DEST="{{ pxc_backup_destination }}" 10 | PASS="{{ pxc_root_password }}" 11 | 12 | DB=`echo "show databases;" | mysql --password=$PASS | tail -n +2 | grep -v information_schema | grep -v performance_schema` 13 | for j in $DB; do 14 | [[ $1 == '-v' ]] && echo -n "Backuping $j..." 15 | DATE=`date +%Y%m%d_%H%M%S` 16 | mysqldump --password=$PASS ---routines --triggers --single-transaction $j 2> /tmp/error | bzip2 > $DEST/$j-$DATE.sql.bz2 17 | if [ $? != 0 ]; then 18 | echo "Error backuping (mysqldump) $j :" 19 | cat /tmp/error 20 | echo 21 | else 22 | [[ $1 == '-v' ]] && echo done 23 | fi 24 | 25 | # remove older backups for mysqldump 26 | COUNT=$(( `ls $DEST/$j-* | wc -l` - $KEEP )) 27 | if [ $COUNT -gt 0 ]; then 28 | [[ $1 == '-v' ]] && echo "Erasing $COUNT old backups (mysqldump) for $j" 29 | for i in `ls $DEST/$j-* | head -$COUNT`; do 30 | rm $i 31 | done 32 | fi 33 | 34 | if [ -n "{{ pxc_backup_s3bucket }}" ]; then 35 | s3cmd sync --delete-removed ${DEST}/ s3://{{ pxc_backup_s3bucket }}/ 36 | fi 37 | 38 | if [ -n "{{ pxc_backup_gcloudbucket }}" ]; then 39 | gsutil -m rsync -r ${DEST} gs://{{ pxc_backup_gcloudbucket }}/$(hostname)/ 40 | fi 41 | done 42 | 43 | -------------------------------------------------------------------------------- /templates/charset.cnf.j2: -------------------------------------------------------------------------------- 1 | [client] 2 | default-character-set = utf8mb4 3 | 4 | [mysql] 5 | default-character-set = utf8mb4 6 | 7 | [mysqld] 8 | character-set-client-handshake = FALSE 9 | character-set-server = utf8mb4 10 | collation-server = utf8mb4_unicode_ci 11 | innodb_large_prefix = ON 12 | 13 | userstat = ON 14 | thread_statistics = ON 15 | -------------------------------------------------------------------------------- /templates/datadog_mysql.yaml.j2: -------------------------------------------------------------------------------- 1 | # MySQL integration 2 | 3 | init_config: 4 | 5 | instances: 6 | - server: localhost 7 | user: {{ pxc_datadog_user }} 8 | pass: {{ pxc_datadog_password }} 9 | sock: /var/run/mysqld/mysqld.sock 10 | tags: 11 | - pxc 12 | options: 13 | replication: 0 14 | galera_cluster: 1 15 | -------------------------------------------------------------------------------- /templates/ferm.j2: -------------------------------------------------------------------------------- 1 | {% import 'variables.inc' as var with context %} 2 | 3 | # Allow access to clients 4 | protocol tcp dport 3306 { 5 | @def $ITEMS = ( @ipfilter( ( {{ var.mysql_allow | unique | join(" ") }} ) ) ); 6 | saddr $ITEMS ACCEPT; 7 | } 8 | 9 | # Allow access to cluster members 10 | protocol tcp dport (4444 4567 4568) { 11 | @def $ITEMS = ( @ipfilter( ( {{ var.cluster_members | unique | join(" ") }} ) ) ); 12 | saddr $ITEMS ACCEPT; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /templates/logrotate.j2: -------------------------------------------------------------------------------- 1 | # - I put everything in one block and added sharedscripts, so that mysql gets 2 | # flush-logs'd only once. 3 | # Else the binary logs would automatically increase by n times every day. 4 | # - The error log is obsolete, messages go to syslog now. 5 | /var/log/mysql/*.log { 6 | daily 7 | rotate 7 8 | missingok 9 | create 640 mysql adm 10 | compress 11 | sharedscripts 12 | postrotate 13 | test -x /usr/bin/mysqladmin || exit 0 14 | 15 | # If this fails, check debian.conf! 16 | MYADMIN="/usr/bin/mysqladmin --defaults-file=/root/.my.cnf" 17 | if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then 18 | # Really no mysqld or rather a missing debian-sys-maint user? 19 | # If this occurs and is not a error please report a bug. 20 | if ps cax | grep -q mysqld; then 21 | exit 1 22 | fi 23 | else 24 | $MYADMIN flush-logs 25 | fi 26 | endscript 27 | } -------------------------------------------------------------------------------- /templates/root_my.cnf.j2: -------------------------------------------------------------------------------- 1 | # 2 | # {{ ansible_managed }} 3 | # 4 | 5 | [client] 6 | user = root 7 | password = {{ pxc_root_password }} 8 | -------------------------------------------------------------------------------- /templates/variables.inc: -------------------------------------------------------------------------------- 1 | {% set cluster_members = [] -%} 2 | {%- for node in groups[pxc_cluster_group] %} 3 | {%- set _ = cluster_members.append(hostvars[node]['ansible_' + hostvars[node].pxc_cluster_bind_interface].ipv4.address) -%} 4 | {% endfor -%} 5 | {# #} 6 | {% set mysql_allow = [] -%} 7 | {%- for elt in pxc_filter_allow_mysql_port %} 8 | {% if elt in hostvars %} 9 | {# this is a node #} 10 | {%- set _ = mysql_allow + hostvars[elt]['ansible_all_ipv4_addresses'] -%} 11 | {% elif elt|ipaddr %} 12 | {# this is an IP #} 13 | {%- set _ = mysql_allow.append(elt) -%} 14 | {% else %} 15 | {# this is a group #} 16 | {% for hst in groups[elt] %} 17 | {%- set _ = mysql_allow + hostvars[hst]['ansible_all_ipv4_addresses'] -%} 18 | {% endfor %} 19 | {% endif %} 20 | {% endfor -%} 21 | -------------------------------------------------------------------------------- /templates/wsrep.cnf.j2: -------------------------------------------------------------------------------- 1 | # 2 | # Ansible managed 3 | # 4 | 5 | [mysql] 6 | prompt='mysql [{{ inventory_hostname }}] > ' 7 | 8 | [mysqld] 9 | bind-address = {{ hostvars[inventory_hostname]['ansible_' + pxc_bind_interface].ipv4.address }} 10 | datadir = {{ pxc_datadir }} 11 | log_warnings=2 12 | server_id=1 13 | log_bin=percona-bin 14 | log_slave_updates 15 | binlog_format = ROW 16 | expire-logs-days = {{ pxc_expire_log_days }} 17 | 18 | enforce_gtid_consistency=1 19 | gtid_mode=on 20 | log_error=/var/log/mysql/error.log 21 | max_allowed_packet = {{ pxc_max_allowed_packet }} 22 | 23 | {# list of cluster members #} 24 | {% set cluster_members = [] -%} 25 | 26 | {%- for node in groups[pxc_cluster_group] %} 27 | {%- set _ = cluster_members.append(hostvars[node]['ansible_' + pxc_bind_interface].ipv4.address) -%} 28 | {% endfor -%} 29 | wsrep_cluster_address = gcomm://{{ ",".join(cluster_members) }} 30 | wsrep_cluster_name = {{ pxc_cluster_name }} 31 | wsrep_node_name = {{ inventory_hostname }} 32 | wsrep_node_address = {{ hostvars[inventory_hostname]['ansible_' + pxc_bind_interface].ipv4.address }} 33 | # wsrep_provider_options="base_host={{ hostvars[inventory_hostname]['ansible_' + pxc_bind_interface].ipv4.address }}" 34 | 35 | wsrep_provider = /usr/lib/libgalera_smm.so 36 | wsrep_sst_method = xtrabackup-v2 37 | wsrep_sst_auth = {{ pxc_cluster_sst_user }}:{{ pxc_cluster_sst_password }} 38 | 39 | # InnoDB config 40 | innodb_locks_unsafe_for_binlog = 1 41 | innodb_autoinc_lock_mode = 2 42 | {% if pxc_innodb_buffer_pool_size is defined %} 43 | innodb_buffer_pool_size = {{ pxc_innodb_buffer_pool_size }} 44 | {% elif ansible_memtotal_mb > 32000 %} 45 | innodb_buffer_pool_size = {{ (ansible_memtotal_mb - 32000)*1024*1024 }} 46 | {% else %} 47 | # Using default innodb_buffer_pool_size since memory is below 32G 48 | innodb_buffer_pool_size = 128M 49 | {% endif %} 50 | 51 | innodb_large_prefix={{ "on" if pxc_innodb_large_prefix else "off" }} 52 | 53 | pxc_strict_mode = {{ pxc_strict_mode }} 54 | 55 | !includedir /etc/mysql/conf.d/ 56 | 57 | # wsrep_slave_threads={{ ansible_processor_cores }} 58 | # wsrep_notify_cmd=/usr/local/bin/wsrep_notify.sh 59 | # wsrep_sst_receive_address={{ hostvars[inventory_hostname]['ansible_' + pxc_bind_interface].ipv4.address }} 60 | --------------------------------------------------------------------------------