|
12345678910111213141516171819202122232425262728293031323334353637383940 |
-
- {%- set master = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['mariadb-server-10.1', 'galera-3', 'libmariadbclient18', 'libmysqlclient18', 'mariadb-client-10.1', 'mariadb-client-core-10.1', 'mariadb-common', 'mariadb-server-core-10.1', 'mysql-common', 'python-mysqldb'],
- 'service': 'mysql',
- 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
- 'log_file': '/var/log/mysql.log',
- 'socket': '/var/run/mysqld/mysqld.sock',
- 'config': '/etc/mysql/my.cnf',
- },
- 'RedHat': {
- 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
- 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
- 'service': 'mariadb',
- 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
- 'log_file': '/var/log/mariadb/mariadb.log',
- 'socket': '/var/run/mariadb/mysqld.sock',
- 'config': '/etc/my.cnf',
- },
- }, merge=salt['pillar.get']('galera:master')) %}
-
- {%- set slave = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['mariadb-server-10.1', 'galera-3', 'libmariadbclient18', 'libmysqlclient18', 'mariadb-client-10.1', 'mariadb-client-core-10.1', 'mariadb-common', 'mariadb-server-core-10.1', 'mysql-common', 'python-mysqldb'],
- 'service': 'mysql',
- 'wsrep_provider': '/usr/lib/galera/libgalera_smm.so',
- 'log_file': '/var/log/mysql.log',
- 'socket': '/var/run/mysqld/mysqld.sock',
- 'config': '/etc/mysql/my.cnf',
- },
- 'RedHat': {
- 'pkgs': ['galera', 'mariadb-galera-server', 'mariadb', 'MySQL-python', 'rsync', 'percona-xtrabackup', 'psmisc', 'socat'],
- 'xtrabackup_repo': 'http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm',
- 'service': 'mariadb',
- 'wsrep_provider': '/usr/lib64/galera/libgalera_smm.so',
- 'log_file': '/var/log/mariadb/mariadb.log',
- 'socket': '/var/run/mariadb/mysqld.sock',
- 'config': '/etc/my.cnf',
- },
- }, merge=salt['pillar.get']('galera:slave')) %}
|