Saltstack Official Salt Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

37 行
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. {% endif %}
  10. file.recurse:
  11. - name: {{ salt_settings.config_path }}/master.d
  12. - template: jinja
  13. - source: salt://{{ slspath }}/files/master.d
  14. - clean: {{ salt_settings.clean_config_d_dir }}
  15. - exclude_pat: _*
  16. service.running:
  17. - enable: True
  18. - name: {{ salt_settings.master_service }}
  19. - watch:
  20. {% if salt_settings.install_packages %}
  21. - pkg: salt-master
  22. {% endif %}
  23. - file: salt-master
  24. - file: remove-old-master-conf-file
  25. {% if salt_settings.master_remove_config %}
  26. remove-default-master-conf-file:
  27. file.absent:
  28. - name: {{ salt_settings.config_path }}/master
  29. {% endif %}
  30. # clean up old _defaults.conf file if they have it around
  31. remove-old-master-conf-file:
  32. file.absent:
  33. - name: {{ salt_settings.config_path }}/master.d/_defaults.conf