You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
925 B
33 lines
925 B
---
|
|
- name: Create EFI system partition
|
|
parted:
|
|
device: "{{ partitioning_priv_device_node }}"
|
|
state: present
|
|
label: gpt
|
|
number: 1
|
|
name: ESP
|
|
part_start: "{{ 1024 * 1024 }}B"
|
|
part_end: "{{ partitioning_priv_esp_size | int + 1024 * 1024 - 1 }}B"
|
|
flags:
|
|
- esp
|
|
|
|
- name: Create root partition
|
|
parted:
|
|
device: "{{ partitioning_priv_device_node }}"
|
|
state: present
|
|
label: gpt
|
|
number: 2
|
|
name: root
|
|
part_start: "{{ partitioning_priv_esp_size | int + 1024 * 1024 }}B"
|
|
|
|
- name: Enumerate created partitions.
|
|
shell: |
|
|
set -e -o pipefail
|
|
lsblk -n -o PATH {{ partitioning_priv_device_node | quote }} | tail -n +2
|
|
register: _partitions
|
|
changed_when: false
|
|
|
|
- name: Assign partitions to variables.
|
|
set_fact:
|
|
partitioning_priv_esp_device_node: "{{ _partitions.stdout_lines[0] }}"
|
|
partitioning_priv_root_device_node: "{{ _partitions.stdout_lines[1] }}"
|
|
|