- Generate resolv.conf from inventory DNS settings instead of copying host file (Arch ISO has systemd-resolved stub 127.0.0.53) - Add XFS compat options for GRUB 2.06 and kernel 5.14 across LVM volumes, /boot partition, and data disks - Mount API filesystems (proc, sys, dev) into chroot for RPM scriptlets - Bypass GPG Sequoia validation with _pkgverify_level none - Tolerate grub2-common scriptlet warnings - Handle libvirt VM destroy gracefully during cleanup
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
- name: Create API filesystem mountpoints in installroot
|
|
when: is_rhel | bool
|
|
ansible.builtin.file:
|
|
path: "/mnt/{{ item }}"
|
|
state: directory
|
|
mode: "0755"
|
|
loop:
|
|
- dev
|
|
- proc
|
|
- sys
|
|
|
|
- name: Mount API filesystems into installroot
|
|
when: is_rhel | bool
|
|
ansible.posix.mount:
|
|
src: "{{ item.src }}"
|
|
path: "/mnt/{{ item.path }}"
|
|
fstype: "{{ item.fstype }}"
|
|
opts: "{{ item.opts | default(omit) }}"
|
|
state: ephemeral
|
|
loop:
|
|
- { src: proc, path: proc, fstype: proc }
|
|
- { src: sysfs, path: sys, fstype: sysfs }
|
|
- { src: /dev, path: dev, fstype: none, opts: bind }
|
|
|
|
- name: Run OS-specific bootstrap process
|
|
vars:
|
|
bootstrap_os_task_map:
|
|
almalinux: almalinux.yml
|
|
alpine: alpine.yml
|
|
archlinux: archlinux.yml
|
|
debian: debian.yml
|
|
fedora: fedora.yml
|
|
opensuse: opensuse.yml
|
|
rocky: rocky.yml
|
|
rhel: rhel.yml
|
|
ubuntu: ubuntu.yml
|
|
ubuntu-lts: ubuntu.yml
|
|
void: void.yml
|
|
bootstrap_var_key: "{{ 'bootstrap_' + (os | replace('-lts', '') | replace('-', '_')) }}"
|
|
ansible.builtin.include_tasks: "{{ bootstrap_os_task_map[os] }}"
|