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