Saltstack Official Linux Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

31 rinda
663B

  1. {%- from "linux/map.jinja" import storage with context %}
  2. {%- if storage.enabled %}
  3. {%- for name, mount in storage.mount.iteritems() %}
  4. {%- if mount.enabled %}
  5. {%- if not mount.file_system in ['nfs'] %}
  6. mkfs_{{ mount.device}}:
  7. cmd.run:
  8. - name: "mkfs.{{ mount.file_system }} -L {{ name }} {{ mount.device }}"
  9. - onlyif: "test `blkid {{ mount.device }} >/dev/null;echo $?` -eq 2"
  10. - require_in:
  11. - mount: {{ mount.path }}
  12. {%- endif %}
  13. {{ mount.path }}:
  14. mount.mounted:
  15. - device: {{ mount.device }}
  16. - fstype: {{ mount.file_system }}
  17. - mkmnt: True
  18. - opts: {{ mount.get('opts', 'defaults,noatime') }}
  19. {%- endif %}
  20. {%- endfor %}
  21. {%- endif %}