ansible/roles/common/tasks/aya01_fstab.yml

24 lines
451 B
YAML
Raw Normal View History

---
- 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
register: fstab
- name: Mount all disks
command: mount -a
become: true
when: fstab.changed