Skip to content
Snippets Groups Projects
Verified Commit 4fbcb12e authored by nl6720's avatar nl6720
Browse files

install_arch: create all partitions with a single sgdisk command

There is no need to split up partitioning into per-partition tasks.
Use long options for readability.
parent fe66da19
No related branches found
No related tags found
1 merge request!830install_arch: align partition end, update root partition type, partition labels and ESP volume label
......@@ -29,22 +29,15 @@
- name: Set the no-use-tor option in dirmngr.conf
lineinfile: name=/root/.gnupg/dirmngr.conf create=yes line=no-use-tor owner=root group=root mode=0644
- name: Create GRUB embed partitions
command: sgdisk -g -I --clear -n 1:0:+1M {{ item }} -c 1:'BIOS boot partition' -t 1:ef02
with_items:
- "{{ system_disks }}"
register: sgdisk
changed_when: "sgdisk.rc == 0"
- name: Create EFI system partitions
command: sgdisk -g -I -n 2:0:+512M {{ item }} -c 2:'EFI system partition' -t 2:ef00
with_items:
- "{{ system_disks }}"
register: sgdisk
changed_when: "sgdisk.rc == 0"
- name: Create root partitions
command: sgdisk -I -n 3:0:0 {{ item }} -c 3:root -t 3:8304
- name: Create partitions
command: >
sgdisk
--align-end
--clear
--new=0:0:+1M --change-name=0:'BIOS boot partition' --typecode=0:ef02
--new=0:0:+512M --change-name=0:'EFI system partition' --typecode=0:ef00
--new=0:0:0 --change-name=0:root --typecode=0:8304
{{ item }}
with_items:
- "{{ system_disks }}"
register: sgdisk
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment