disks.yml 720 B

1234567891011121314151617181920212223242526
  1. ---
  2. - name: Create mount points
  3. file:
  4. path: "{{ item.path }}"
  5. state: directory
  6. owner: "{{ item.owner | default('root') }}"
  7. group: "{{ item.group | default('root') }}"
  8. mode: "{{ item.mode | default('0750') }}"
  9. with_items:
  10. - "{{ snapraid_parity_disks }}"
  11. - "{{ snapraid_data_disks }}"
  12. loop_control:
  13. label: "{{ item.path }}"
  14. - name: Ensure disks are mounted
  15. mount:
  16. path: "{{ item.path }}"
  17. src: "{{ item.disk }}"
  18. fstype: "{{ item.fs | default('xfs') }}"
  19. opts: "{{ item.opts | default('defaults') }}"
  20. state: mounted
  21. with_items:
  22. - "{{ snapraid_parity_disks }}"
  23. - "{{ snapraid_data_disks }}"
  24. loop_control:
  25. label: "{{ item.disk }} -> {{ item.path }}"