Saltstack Official Galera Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
884B

  1. {%- set master = salt['grains.filter_by']({
  2. 'Debian': {
  3. 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
  4. 'service': 'mysql',
  5. 'config': '/etc/mysql/my.cnf',
  6. },
  7. 'RedHat': {
  8. 'pkgs': ['MySQL-server', 'galera', 'MySQL-client', 'MySQL-python', 'rsync'],
  9. 'service': 'mysql',
  10. },
  11. }, merge=salt['pillar.get']('galera:master')) %}
  12. {%- set slave = salt['grains.filter_by']({
  13. 'Debian': {
  14. 'pkgs': ['mysql-server-wsrep', 'galera', 'rsync', 'python-mysqldb', 'libmysqlclient18', 'psmisc', 'netcat', 'percona-xtrabackup-21', 'socat'],
  15. 'service': 'mysql',
  16. 'config': '/etc/mysql/my.cnf',
  17. },
  18. 'RedHat': {
  19. 'pkgs': ['MySQL-server', 'galera', 'MySQL-client', 'MySQL-python', 'rsync'],
  20. 'service': 'mysql',
  21. },
  22. }, merge=salt['pillar.get']('galera:slave')) %}