Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
c2b26284
Commit
c2b26284
authored
Jun 29, 2020
by
Ira ¯\_(ツ)_/¯
Committed by
Sven-Hendrik Haase
Jun 29, 2020
Browse files
Remove mdadm/ext4 related tasks from Ansible
parent
a40f53f0
Pipeline
#283
passed with stage
in 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
roles/install_arch/tasks/main.yml
View file @
c2b26284
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment