Saltstack Official Salt Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

38 lines
1.1KB

  1. {% from "salt/map.jinja" import salt_settings with context %}
  2. salt-master:
  3. {% if salt_settings.install_packages %}
  4. pkg.installed:
  5. - name: {{ salt_settings.salt_master }}
  6. {%- if salt_settings.version is defined %}
  7. - version: {{ salt_settings.version }}
  8. {%- endif %}
  9. - require_in:
  10. - service: salt-master
  11. - watch_in:
  12. - service: salt-master
  13. {% endif %}
  14. file.recurse:
  15. - name: {{ salt_settings.config_path }}/master.d
  16. - template: jinja
  17. - source: salt://{{ slspath }}/files/master.d
  18. - clean: {{ salt_settings.clean_config_d_dir }}
  19. - exclude_pat: _*
  20. service.running:
  21. - enable: True
  22. - name: {{ salt_settings.master_service }}
  23. - watch:
  24. - file: salt-master
  25. - file: remove-old-master-conf-file
  26. {% if salt_settings.master_remove_config %}
  27. remove-default-master-conf-file:
  28. file.absent:
  29. - name: {{ salt_settings.config_path }}/master
  30. {% endif %}
  31. # clean up old _defaults.conf file if they have it around
  32. remove-old-master-conf-file:
  33. file.absent:
  34. - name: {{ salt_settings.config_path }}/master.d/_defaults.conf