Saltstack Official Salt Formula
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

master.sls 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  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