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

43 行
817B

  1. {%- from "salt/map.jinja" import master with context %}
  2. {%- if master.enabled %}
  3. salt_master_packages:
  4. pkg.latest:
  5. - names: {{ master.pkgs }}
  6. /etc/salt/master.d/master.conf:
  7. file.managed:
  8. - source: salt://salt/files/master.conf
  9. - user: root
  10. - template: jinja
  11. - require:
  12. - pkg: salt_master_packages
  13. - watch_in:
  14. - service: salt_master_service
  15. {%- if master.peer is defined %}
  16. /etc/salt/master.d/_peer.conf:
  17. file.managed:
  18. - source: salt://salt/files/_peer.conf
  19. - user: root
  20. - template: jinja
  21. - require:
  22. - pkg: salt_master_packages
  23. - watch_in:
  24. - service: salt_master_service
  25. {%- endif %}
  26. salt_master_service:
  27. service.running:
  28. - name: {{ master.service }}
  29. - enable: true
  30. /srv/salt/env:
  31. file.directory:
  32. - user: root
  33. - mode: 755
  34. - makedirs: true
  35. {%- endif %}