2022-12-06 16:36:21 +01:00
|
|
|
---
|
|
|
|
- name: Create folders to mount to
|
|
|
|
file:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
state: directory
|
|
|
|
loop: "{{ fstab_entries }}"
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Create fstab entries
|
|
|
|
mount:
|
|
|
|
src: "UUID={{ item.uuid }}"
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
fstype: "{{ item.type }}"
|
|
|
|
state: present
|
|
|
|
backup: true
|
|
|
|
loop: "{{ fstab_entries }}"
|
|
|
|
become: true
|
2022-12-29 22:45:17 +01:00
|
|
|
register: fstab
|
2022-12-06 16:36:21 +01:00
|
|
|
|
|
|
|
- name: Mount all disks
|
|
|
|
command: mount -a
|
|
|
|
become: true
|
2022-12-29 22:45:17 +01:00
|
|
|
when: fstab.changed
|