galera.j2 686 B

12345678910111213141516171819202122
  1. # Galera-related settings
  2. #
  3. [mysqld]
  4. binlog_format = row
  5. default_storage_engine = InnoDB
  6. innodb_autoinc_lock_mode = 2
  7. bind-address = {{ mariadb_bind_address }}
  8. # Galera Provider Configuration
  9. wsrep_on = ON
  10. wsrep_provider = {{ galera_wsrep_provider }}
  11. # Galera Cluster Configuration
  12. wsrep_cluster_name = {{ galera_cluster_name }}
  13. wsrep_cluster_address = "gcomm://{% for host in groups['db_servers'] %}{{ hostvars[host]['ansible_host'] }}{{ ',' if not loop.last }}{% endfor %}"
  14. # Galera Synchronization Configuration
  15. wsrep_sst_method = rsync
  16. # Galera Node Configuration
  17. wsrep_node_address = {{ hostvars[ansible_hostname]['ansible_host'] }}
  18. wsrep_node_name = {{ ansible_hostname }}