Saltstack Official Salt Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

34 lines
987B

  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