add docker mountpoint on extra subvolume

note: right now the subvol needs to be created prior running this
playbook
This commit is contained in:
2021-10-31 15:14:53 +01:00
parent 6b575f9cf0
commit d8ec78a841
6 changed files with 52 additions and 19 deletions

View File

@@ -199,7 +199,7 @@ rpm_ostree_layered_packages:
compsize:
state: absent
docker-compose:
state: absent
state: present
fd-find:
state: absent
git:
@@ -217,7 +217,7 @@ rpm_ostree_layered_packages:
microdnf:
state: present
moby-engine:
state: absent
state: present
mosh:
state: absent
ncdu:
@@ -273,12 +273,21 @@ etc_fstab_entries:
opts: noatime,subvol=root,compress=zstd:1,x-systemd.device-timeout=0
passno: 0
dump: 0
state: present
home:
path: /home
fstype: btrfs
opts: subvol=home,compress=zstd:1,x-systemd.device-timeout=0
passno: 0
dump: 0
state: present
docker:
path: /var/lib/docker
fstype: btrfs
opts: subvol=docker,compress=zstd:1,x-systemd.device-timeout=0
passno: 0
dump: 0
state: mounted
users:
flexo:

View File

@@ -6,6 +6,8 @@ etc_fstab_entries_overwrite:
src: UUID=254d6a53-398a-4a53-93d1-c45e61263791
home:
src: UUID=254d6a53-398a-4a53-93d1-c45e61263791
docker:
src: UUID=254d6a53-398a-4a53-93d1-c45e61263791
rpm_ostree_kargs_overwrite:
'i915.enable_psr=0':

View File

@@ -6,6 +6,8 @@ etc_fstab_entries_overwrite:
src: UUID=aa63fb86-3fc9-42d1-82ca-7d47d0238765
home:
src: UUID=aa63fb86-3fc9-42d1-82ca-7d47d0238765
docker:
src: UUID=aa63fb86-3fc9-42d1-82ca-7d47d0238765
flatpak_flatpaks_overwrite:
com.github.Bleuzen.FFaudioConverter:

View File

@@ -6,6 +6,8 @@ etc_fstab_entries_overwrite:
src: UUID=f1b9b845-5f3c-4912-b729-b6e8605f0def
home:
src: UUID=f1b9b845-5f3c-4912-b729-b6e8605f0def
docker:
src: UUID=f1b9b845-5f3c-4912-b729-b6e8605f0def
flatpak_flatpaks_overwrite:
org.gnome.Firmware:

View File

@@ -1,11 +1,29 @@
---
- name: Merge fstab entries
- 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: Configure fstab
#- 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 }}"
@@ -13,6 +31,6 @@
opts: "{{ item.value.opts }}"
passno: "{{ item.value.passno }}"
dump: "{{ item.value.dump }}"
state: present
state: "{{ item.value.state }}"
become: yes
loop: "{{ lookup('dict', etc_fstab_entries, wantlist=True) }}"

View File

@@ -5,5 +5,5 @@
connection: "local"
roles:
- flatpak
- rpm-ostree
- etc
- rpm-ostree