Saltstack Official Salt Formula
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

38 lines
1.1KB

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