Saltstack Official Salt Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 11 години
преди 11 години
преди 5 години
преди 11 години
преди 11 години
преди 11 години
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