major refactoring

This commit is contained in:
2022-01-18 23:48:56 +01:00
parent 034332b237
commit fe83fd37f0
40 changed files with 501 additions and 433 deletions

View File

@@ -0,0 +1,36 @@
---
- 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) }}"