Saltstack Official Galera Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

52 rindas
1.3KB

  1. {%- from "galera/map.jinja" import clustercheck %}
  2. {%- if clustercheck.get('enabled', False) %}
  3. clustercheck_dir:
  4. file.directory:
  5. - name: /usr/local/bin/
  6. - user: root
  7. - group: root
  8. - mode: 750
  9. - makedirs: True
  10. /usr/local/bin/mysql_clustercheck:
  11. file.managed:
  12. - source: salt://galera/files/clustercheck.sh
  13. - user: root
  14. - group: root
  15. - mode: 755
  16. - require:
  17. - file: clustercheck_dir
  18. /etc/xinetd.d/mysql_clustercheck.conf:
  19. file.managed:
  20. - source: salt://galera/files/xinet.d.conf
  21. - template: jinja
  22. - makedirs: True
  23. - defaults:
  24. user: nobody
  25. server: '/usr/local/bin/clustercheck {{ clustercheck.get('user', 'clustercheck') }} {{ clustercheck.get('password', 'clustercheck') }} {{ clustercheck.get('available_when_donor', 0) }} {{ clustercheck.get('available_when_readonly', 0) }}'
  26. port: {{ clustercheck.get('port', 9200) }}
  27. flags: REUSE
  28. per_source: UNLIMITED
  29. - require:
  30. - file: /usr/local/bin/mysql_clustercheck
  31. {%- if not grains.get('noservices', False) %}
  32. - watch_in:
  33. - galera_xinetd_service
  34. {%- endif %}
  35. galera_xinetd_package:
  36. pkg.installed:
  37. - name: xinetd
  38. {%- if not grains.get('noservices', False) %}
  39. galera_xinetd_service:
  40. service.running:
  41. - name: xinetd
  42. - require:
  43. - pkg: xinetd
  44. {%- endif %}
  45. {%- endif %}