Saltstack Official Salt Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

29 lines
855B

  1. {% from "salt/map.jinja" import salt_settings with context %}
  2. include:
  3. - salt.master
  4. salt-api:
  5. {% if salt_settings.install_packages %}
  6. pkg.installed:
  7. - name: {{ salt_settings.salt_api }}
  8. {%- if salt_settings.version is defined %}
  9. - version: {{ salt_settings.version }}
  10. {%- endif %}
  11. {% endif %}
  12. {% if salt_settings.api_service_details.state != 'ignore' %}
  13. service.{{ salt_settings.api_service_details.state }}:
  14. - enable: {{ salt_settings.api_service_details.enabled }}
  15. - name: {{ salt_settings.api_service }}
  16. {%- if grains.os_family in ['FreeBSD', 'Gentoo'] %}
  17. - retry: {{ salt_settings.retry_options | json }}
  18. {%- endif %}
  19. - require:
  20. - service: {{ salt_settings.master_service }}
  21. - watch:
  22. {% if salt_settings.install_packages %}
  23. - pkg: salt-api
  24. {% endif %}
  25. - file: salt-master
  26. {% endif %}