2019-06-15 15:14:27 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Ensure mountpoints are present
|
|
|
|
file:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
recurse: yes
|
|
|
|
state: directory
|
2019-08-28 08:36:26 +00:00
|
|
|
loop: "{{ pve_disk_mount }}"
|
2019-06-15 15:14:27 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.path }}"
|
|
|
|
|
|
|
|
- name: Add diskmounts to fstab
|
|
|
|
mount:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
fstype: "{{ item.fstype }}"
|
|
|
|
opts: "{{ item.opts | default(omit) }}"
|
2019-06-15 15:19:30 +00:00
|
|
|
state: "{{ item.state | default('mounted') }}"
|
2019-08-28 08:36:26 +00:00
|
|
|
loop: "{{ pve_disk_mount }}"
|
2019-06-15 15:14:27 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.src }} {{ item.path }}"
|
|
|
|
become: True
|
|
|
|
become_user: root
|