Files
silverblue-playbook/roles/etc/tasks/fstab.yml
Marco d8ec78a841 add docker mountpoint on extra subvolume
note: right now the subvol needs to be created prior running this
playbook
2021-10-31 15:14:53 +01:00

37 lines
1.1 KiB
YAML

---
- name: Configure fstab
block:
- name: Merge variables
set_fact:
etc_fstab_entries: '{{ etc_fstab_entries | combine(etc_fstab_entries_overwrite, recursive=True) }}'
when:
- etc_fstab_entries_overwrite | default()
#- name: Mount btrfs root
# ansible.posix.mount:
# src: "'/dev/mapper/luks-' + {{ etc_fstab_btrfs_root }}"
# path: "/mnt"
# become: yes
#- name: Create subvolume
# #ansible.builtin.command:
# ansible.builtin.debug:
# #cmd: "btrfs subvolume create {{ item }}"
# msg: "{{ item }}"
# become: yes
# loop: "{{ lookup('dict', etc_fstab_entries, wantlist=True) }}"
# when:
# "item.value.path != '/' and item.value.path != '/home'"
- name: Write fstab entries
ansible.posix.mount:
src: "{{ item.value.src }}"
path: "{{ item.value.path }}"
fstype: "{{ item.value.fstype }}"
opts: "{{ item.value.opts }}"
passno: "{{ item.value.passno }}"
dump: "{{ item.value.dump }}"
state: "{{ item.value.state }}"
become: yes
loop: "{{ lookup('dict', etc_fstab_entries, wantlist=True) }}"