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ů.

standalone.sls 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  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. {%- if salt_settings.version is defined %}
  7. - version: {{ salt_settings.version }}
  8. {%- endif %}
  9. {% endif %}
  10. file.recurse:
  11. - name: {{ salt_settings.config_path }}/minion.d
  12. - template: jinja
  13. - source: salt://{{ slspath }}/files/minion.d
  14. - clean: {{ salt_settings.clean_config_d_dir }}
  15. - exclude_pat: _*
  16. - context:
  17. standalone: True
  18. {%- if salt_settings.minion.master_type is defined and salt_settings.minion.master_type == 'disable' %}
  19. service.running:
  20. - enable: True
  21. {%- else %}
  22. service.dead:
  23. - enable: False
  24. {%- endif %}
  25. - name: {{ salt_settings.minion_service }}
  26. - require:
  27. {% if salt_settings.install_packages %}
  28. - pkg: salt-minion
  29. {% endif %}
  30. - file: salt-minion
  31. # clean up old _defaults.conf file if they have it around
  32. remove-old-standalone-conf-file:
  33. file.absent:
  34. - name: {{ salt_settings.config_path }}/minion.d/_defaults.conf