end play after archinstall, sort lsblk calls sort partition order makes sense

This commit is contained in:
Mark Riedesel 2024-11-20 15:11:31 -06:00
parent ecff8f2050
commit da3e75d489
6 changed files with 12 additions and 7 deletions

View file

@ -1,5 +1,6 @@
--- ---
ansible_user: root ansible_user: root
ansible_host: 10.4.0.49
base_root_swap_mib: "{{ 1024 * 16 }}" base_root_swap_mib: "{{ 1024 * 16 }}"
base_root_efi_mib: 512 base_root_efi_mib: 512

View file

@ -1,6 +1,2 @@
--- ---
- hosts: all
roles:
- detect_archiso
- import_playbook: playbooks/install.yaml - import_playbook: playbooks/install.yaml

View file

@ -9,3 +9,8 @@
tags: base tags: base
roles: roles:
- base - base
# - name: install minimal system packages
# hosts: base
# roles:
# - packages_minimal

View file

@ -11,6 +11,7 @@
shell: "pacstrap /mnt {{ packages | join(' ') }}" shell: "pacstrap /mnt {{ packages | join(' ') }}"
vars: vars:
packages: packages:
- ansible
- base - base
- base-devel - base-devel
- efibootmgr - efibootmgr

View file

@ -71,7 +71,7 @@
register: parted_create register: parted_create
- name: Collect EFI partition devices - name: Collect EFI partition devices
command: "lsblk -r --noheadings -o PATH {{ item }}" shell: "lsblk -r --noheadings -o PATH {{ item }} | sort"
register: lsblk register: lsblk
loop: "{{ parted_create.results | map(attribute='disk.dev') }}" loop: "{{ parted_create.results | map(attribute='disk.dev') }}"
@ -106,7 +106,7 @@
register: parted_create register: parted_create
- name: Collect root zvol partition devices - name: Collect root zvol partition devices
command: "lsblk -r --noheadings -o PATH {{ item }}" shell: "lsblk -r --noheadings -o PATH {{ item }} | sort"
register: lsblk register: lsblk
loop: "{{ parted_create.results | map(attribute='disk.dev') }}" loop: "{{ parted_create.results | map(attribute='disk.dev') }}"
@ -142,7 +142,7 @@
when: base_root_swap_mib is defined and base_root_swap_mib|int > 0 when: base_root_swap_mib is defined and base_root_swap_mib|int > 0
- name: Collect swap partition devices - name: Collect swap partition devices
command: "lsblk -r --noheadings -o PATH {{ item }}" shell: "lsblk -r --noheadings -o PATH {{ item }} | sort"
register: lsblk register: lsblk
loop: "{{ parted_create.results | map(attribute='disk.dev') }}" loop: "{{ parted_create.results | map(attribute='disk.dev') }}"
@ -156,6 +156,7 @@
loop: "{{ lsblk.results | map(attribute='stdout_lines') | sort }}" loop: "{{ lsblk.results | map(attribute='stdout_lines') | sort }}"
vars: vars:
part_index: 2 part_index: 2
when: base_root_swap_mib is defined and base_root_swap_mib|int > 0
- name: Analyze resulting partition layouts - name: Analyze resulting partition layouts
parted: parted:

View file

@ -8,4 +8,5 @@
- import_tasks: archinstall/prepare_chroot.yaml - import_tasks: archinstall/prepare_chroot.yaml
- import_tasks: archinstall/install_os.yaml - import_tasks: archinstall/install_os.yaml
- import_tasks: archinstall/postinstall_snapshot.yaml - import_tasks: archinstall/postinstall_snapshot.yaml
- meta: end_play
when: archiso_detected and base_root_disks is defined when: archiso_detected and base_root_disks is defined