diff --git a/host_vars/chapek9.yml b/host_vars/chapek9.yml index d09a19a..f86c289 100644 --- a/host_vars/chapek9.yml +++ b/host_vars/chapek9.yml @@ -1,6 +1,22 @@ --- etc_hostname: chapek9 +etc_fstab_entries: + root: + src: UUID=254d6a53-398a-4a53-93d1-c45e61263791 + path: / + fstype: btrfs + opts: noatime,subvol=root,compress=zstd:1,x-systemd.device-timeout=0 + passno: 0 + dump: 0 + home: + src: UUID=254d6a53-398a-4a53-93d1-c45e61263791 + path: /home + fstype: btrfs + opts: subvol=home,compress=zstd:1,x-systemd.device-timeout=0 + passno: 0 + dump: 0 + rpm_ostree_kargs_overwrite: 'i915.enable_psr=0': state: present diff --git a/roles/etc/defaults/main.yml b/roles/etc/defaults/main.yml index 09c2f1f..9bf8552 100644 --- a/roles/etc/defaults/main.yml +++ b/roles/etc/defaults/main.yml @@ -5,8 +5,5 @@ etc_update_users: true etc_enable_NTS: true etc_configure_firewalld: true etc_configure_sysctl: true - -etc_sysctl_params: - kernel.unprivileged_bpf_disabled: - value: 1 - state: present \ No newline at end of file +etc_configure_fstab: true +etc_configure_btrfs: false diff --git a/roles/etc/tasks/btrfs.yml b/roles/etc/tasks/btrfs.yml new file mode 100644 index 0000000..3084dba --- /dev/null +++ b/roles/etc/tasks/btrfs.yml @@ -0,0 +1,2 @@ +--- +# TODO: snapper, btrfsmaintainance diff --git a/roles/etc/tasks/main.yml b/roles/etc/tasks/main.yml index aa7b7d4..c1e5d58 100644 --- a/roles/etc/tasks/main.yml +++ b/roles/etc/tasks/main.yml @@ -6,6 +6,19 @@ become: yes when: etc_set_hostname | bool +- name: Configure fstab + 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: present + become: yes + loop: "{{ lookup('dict', etc_fstab_entries, wantlist=True) }}" + when: etc_configure_fstab | bool + - name: Include users.yml ansible.builtin.include: users.yml when: etc_update_users | bool @@ -25,3 +38,7 @@ - name: Include sysctl.yml ansible.builtin.include: sysctl.yml when: etc_configure_sysctl | bool + +- name: Include btrfs.yml + ansible.builtin.include: btrfs.yml + when: etc_configure_btrfs | bool