Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 1 | |
| 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 Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame^] | 6 | 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 7 | 'log_file': '/var/log/mysql.log', |
Ales Komarek | 721bd20 | 2015-04-30 15:48:17 +0200 | [diff] [blame] | 8 | 'config': '/etc/mysql/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 9 | }, |
| 10 | 'RedHat': { |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame^] | 11 | 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'], |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 12 | 'service': 'mysqld', |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame^] | 13 | 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 14 | 'log_file': '/var/log/mariadb/mariadb.log', |
Filip Pytloun | 2ea33c7 | 2016-02-16 14:23:51 +0100 | [diff] [blame] | 15 | 'config': '/etc/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 16 | }, |
| 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 Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame^] | 23 | 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 24 | 'log_file': '/var/log/mysql.log', |
Ales Komarek | 67ef806 | 2015-04-30 16:09:30 +0200 | [diff] [blame] | 25 | 'config': '/etc/mysql/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 26 | }, |
| 27 | 'RedHat': { |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame^] | 28 | 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync'], |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 29 | 'service': 'mysqld', |
Filip Pytloun | a3567b8 | 2016-02-16 14:39:22 +0100 | [diff] [blame^] | 30 | 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so', |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 31 | 'log_file': '/var/log/mariadb/mariadb.log', |
Filip Pytloun | 2ea33c7 | 2016-02-16 14:23:51 +0100 | [diff] [blame] | 32 | 'config': '/etc/my.cnf', |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 33 | }, |
| 34 | }, merge=salt['pillar.get']('galera:slave')) %} |