37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
---
|
|
- name: "fstab: Configure mountpoints"
|
|
block:
|
|
- name: "fstab: Merge variables"
|
|
set_fact:
|
|
config_fstab_entries: '{{ config_fstab_entries | combine(config_fstab_entries_overrides, recursive=True) }}'
|
|
when:
|
|
- config_fstab_entries_overrides | default()
|
|
|
|
#- name: Mount btrfs root
|
|
# ansible.posix.mount:
|
|
# src: "'/dev/mapper/luks-' + {{ config_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', config_fstab_entries, wantlist=True) }}"
|
|
# when:
|
|
# "item.value.path != '/' and item.value.path != '/home'"
|
|
|
|
- name: "fstab: Write 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', config_fstab_entries, wantlist=True) }}"
|