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

123456789101112131415161718192021222324252627282930313233
  1. {% from "salt/map.jinja" import salt_settings with context %}
  2. salt-minion:
  3. {% if salt_settings.install_packages %}
  4. pkg.installed:
  5. - name: {{ salt_settings.salt_minion }}
  6. {% endif %}
  7. file.recurse:
  8. - name: {{ salt_settings.config_path }}/minion.d
  9. - template: jinja
  10. - source: salt://{{ slspath }}/files/minion.d
  11. - clean: {{ salt_settings.clean_config_d_dir }}
  12. - exclude_pat: _*
  13. - context:
  14. standalone: True
  15. {%- if salt_settings.minion.master_type is defined and salt_settings.minion.master_type == 'disable' %}
  16. service.running:
  17. - enable: True
  18. {%- else %}
  19. service.dead:
  20. - enable: False
  21. {%- endif %}
  22. - name: {{ salt_settings.minion_service }}
  23. - require:
  24. {% if salt_settings.install_packages %}
  25. - pkg: salt-minion
  26. {% endif %}
  27. - file: salt-minion
  28. # clean up old _defaults.conf file if they have it around
  29. remove-old-standalone-conf-file:
  30. file.absent:
  31. - name: {{ salt_settings.config_path }}/minion.d/_defaults.conf