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

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