Saltstack Official Linux 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.

multipath.sls 897B

9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 %}