blob: 987aa757df3d5ac6136925050dcefce9fbe25fd3 [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 Pytlouna3567b82016-02-16 14:39:22 +01006 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +01007 'log_file': '/var/log/mysql.log',
Ales Komarek721bd202015-04-30 15:48:17 +02008 'config': '/etc/mysql/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +02009 },
10 'RedHat': {
Filip Pytlouna3567b82016-02-16 14:39:22 +010011 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
Filip Pytloune40d54c2016-02-16 14:22:02 +010012 'service': 'mysqld',
Filip Pytlouna3567b82016-02-16 14:39:22 +010013 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +010014 'log_file': '/var/log/mariadb/mariadb.log',
Filip Pytloun2ea33c72016-02-16 14:23:51 +010015 'config': '/etc/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020016 },
17}, merge=salt['pillar.get']('galera:master')) %}
18
19{%- set slave = salt['grains.filter_by']({
20 'Debian': {
21 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
22 'service': 'mysql',
Filip Pytlouna3567b82016-02-16 14:39:22 +010023 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +010024 'log_file': '/var/log/mysql.log',
Ales Komarek67ef8062015-04-30 16:09:30 +020025 'config': '/etc/mysql/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020026 },
27 'RedHat': {
Filip Pytlouna3567b82016-02-16 14:39:22 +010028 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'],
Filip Pytloune40d54c2016-02-16 14:22:02 +010029 'service': 'mysqld',
Filip Pytlouna3567b82016-02-16 14:39:22 +010030 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
Filip Pytloune40d54c2016-02-16 14:22:02 +010031 'log_file': '/var/log/mariadb/mariadb.log',
Filip Pytloun2ea33c72016-02-16 14:23:51 +010032 'config': '/etc/my.cnf',
Ales Komarekcba48ac2015-04-30 11:40:44 +020033 },
34}, merge=salt['pillar.get']('galera:slave')) %}