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

49 行
897B

  1. {%- from "linux/map.jinja" import storage with context %}
  2. {%- if storage.enabled %}
  3. {%- if grains.os_family == 'Debian' %}
  4. linux_multipath_pkgs:
  5. pkg.installed:
  6. - names: {{ storage.multipath_pkgs }}
  7. {%- if storage.multipath.backend not in ['fujitsu'] %}
  8. linux_multipath_boot_pkg:
  9. pkg.installed:
  10. - name: multipath-tools-boot
  11. {%- endif %}
  12. {%- if storage.multipath.backend == 'HDS' %}
  13. /etc/multipath.conf:
  14. file.managed:
  15. - source: salt://linux/files/multipath.conf.hds
  16. - template: jinja
  17. - require:
  18. - pkg: linux_multipath_pkgs
  19. {%- else %}
  20. /etc/multipath.conf:
  21. file.managed:
  22. - source: salt://linux/files/multipath.conf
  23. - template: jinja
  24. - require:
  25. - pkg: linux_multipath_pkgs
  26. {%- endif %}
  27. multipath_service:
  28. service.running:
  29. - enable: True
  30. - name: multipath-tools
  31. - watch:
  32. - file: /etc/multipath.conf
  33. - sig: multipathd
  34. {%- endif %}
  35. {%- endif %}