arch: begin bootstrapping role
This commit is contained in:
46
roles/arch/tasks/filesystems.yml
Normal file
46
roles/arch/tasks/filesystems.yml
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
|
||||
- name: Warn user that the blockdevice will be wiped
|
||||
debug:
|
||||
msg: "Warning! Continueing will wipe {{ arch_device }}!"
|
||||
|
||||
- name: Give user the ability to abort
|
||||
pause:
|
||||
prompt: "You can safely abort now if you want, or continue and wipe {{ arch_device }}"
|
||||
|
||||
- name: Create empty GPT
|
||||
community.general.parted:
|
||||
device: "{{ arch_device }}"
|
||||
label: gpt
|
||||
name: "{{ arch_part_label_base }}"
|
||||
|
||||
- name: Create EFI system partition
|
||||
community.general.parted:
|
||||
device: "{{ arch_device }}"
|
||||
state: present
|
||||
part_end: "{{ arch_part_efi_size }}"
|
||||
number: 1
|
||||
name: "{{ arch_part_label_base }}-efi"
|
||||
|
||||
- name: Create partition for luks
|
||||
community.general.parted:
|
||||
device: "{{ arch_device }}"
|
||||
state: present
|
||||
part_end: "{{ arch_part_root_size }}"
|
||||
number: 2
|
||||
name: "{{ arch_part_label_base }}-main"
|
||||
|
||||
- name: Create luks device on main partition
|
||||
community.crypto.luks_device:
|
||||
device: "{{ arch_luks_device }}"
|
||||
passphrase: "{{ arch_luks_passphrase }}"
|
||||
state: present
|
||||
|
||||
- name: Open luks device
|
||||
community.crypto.luks_device:
|
||||
device: "{{ arch_luks_device }}"
|
||||
passphrase: "{{ arch_luks_passphrase ]]"
|
||||
state: "opened"
|
||||
name: "{{ arch_luks_container_name }}"
|
||||
|
||||
|
8
roles/arch/tasks/main.yml
Normal file
8
roles/arch/tasks/main.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
- name: Format disks
|
||||
import_tasks: filesystems.yml
|
||||
|
||||
- name: pacstrap
|
||||
|
||||
- name: Bootloader
|
Reference in New Issue
Block a user