Saltstack Official Galera Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

clustercheck.sls 1.3KB

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