Commit c2b26284 authored by Ira ¯\_(ツ)_/¯'s avatar Ira ¯\_(ツ)_/¯ Committed by Sven-Hendrik Haase
Browse files

Remove mdadm/ext4 related tasks from Ansible

parent a40f53f0
......@@ -31,22 +31,10 @@
command: mkfs.btrfs -f -L root -d single -m single -O no-holes {{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}
when: filesystem == "btrfs" and system_disks|length == 1
- name: create MDADM array
command: mdadm --create --level=1 --raid-devices=2 --run /dev/md0 {{ system_disks | map('regex_replace', '^(.*)$', '\g<1>p2' if 'nvme' in system_disks[0] else '\g<1>2') | join(' ') }}
when: filesystem != "btrfs" and system_disks|length == 2
- name: format the MDADM array
filesystem: dev=/dev/md0 fstype={{ filesystem|default('ext4') }}
when: filesystem != "btrfs" and system_disks|length == 2
- name: mount the filesystem (btrfs)
mount: src="{{ system_disks[0] }}{{ 'p2' if 'nvme' in system_disks[0] else '2' }}" path=/mnt state=mounted fstype=btrfs opts="compress=zstd,space_cache=v2"
when: filesystem == "btrfs"
- name: mount the filesystem (ext4 RAID)
mount: name=/mnt src=/dev/md0 state=mounted fstype={{ filesystem|default('ext4') }}
when: filesystem != "btrfs" and system_disks|length == 2
- name: touch LOCK file on mountpoint
file: path=/mnt/LOCK state=touch
......@@ -154,10 +142,6 @@
fstype: none
fstab: /dev/dummyfstab
- name: generate mdadm.conf
shell: mdadm --detail --scan >> /mnt/etc/mdadm.conf
when: filesystem != "btrfs"
- name: configure locale.gen
lineinfile: dest=/mnt/etc/locale.gen line="en_US.UTF-8 UTF-8"
......@@ -171,14 +155,6 @@
register: chroot_systemd_firstboot
changed_when: "chroot_systemd_firstboot.rc == 0"
- name: add mdadm_udev to mkinitcpio.conf
lineinfile:
dest: /mnt/etc/mkinitcpio.conf
backrefs: yes
regexp: '^(.*)block filesystems(.*)$'
line: '\1block mdadm_udev filesystems\2'
when: filesystem != "btrfs"
- name: run mkinitcpio
command: chroot /mnt mkinitcpio -p linux
register: chroot_mkinitcpio
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment