blob: ec21f3fcd9c0ad25d787c375d9ae8602ea05e26f [file] [log] [blame]
Ales Komarekcba48ac2015-04-30 11:40:44 +02001
2{%- set master = salt['grains.filter_by']({
3 'Debian': {
4 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
5 'service': 'mysql',
Filip Pytloune40d54c2016-02-16 14:22:02 +01006 'log_file': '/var/log/mysql.log',
Ales Komarek721bd202015-04-30 15:48:17 +02007 'config': '/etc/mysql/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +02008 },
9 'RedHat': {
Filip Pytloun60066482016-02-16 14:26:49 +010010 'pkgs': ['mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
Filip Pytloune40d54c2016-02-16 14:22:02 +010011 'service': 'mysqld',
12 'log_file': '/var/log/mariadb/mariadb.log',
Filip Pytloun2ea33c72016-02-16 14:23:51 +010013 'config': '/etc/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020014 },
15}, merge=salt['pillar.get']('galera:master')) %}
16
17{%- set slave = salt['grains.filter_by']({
18 'Debian': {
19 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
20 'service': 'mysql',
Filip Pytloune40d54c2016-02-16 14:22:02 +010021 'log_file': '/var/log/mysql.log',
Ales Komarek67ef8062015-04-30 16:09:30 +020022 'config': '/etc/mysql/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020023 },
24 'RedHat': {
Filip Pytloun60066482016-02-16 14:26:49 +010025 'pkgs': ['mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
Filip Pytloune40d54c2016-02-16 14:22:02 +010026 'service': 'mysqld',
27 'log_file': '/var/log/mariadb/mariadb.log',
Filip Pytloun2ea33c72016-02-16 14:23:51 +010028 'config': '/etc/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020029 },
30}, merge=salt['pillar.get']('galera:slave')) %}