Split bootstrap by OS
This commit is contained in:
26
roles/bootstrap/tasks/rocky.yml
Normal file
26
roles/bootstrap/tasks/rocky.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
- name: Bootstrap RockyLinux 9
|
||||
vars:
|
||||
bootstrap_rocky_extra: >-
|
||||
{{
|
||||
(
|
||||
(
|
||||
lookup('vars', bootstrap_var_key)
|
||||
| difference(bootstrap_guest_agent_remove_packages)
|
||||
)
|
||||
+ bootstrap_guest_agent_packages
|
||||
)
|
||||
| join(' ')
|
||||
}}
|
||||
ansible.builtin.command: "{{ item }}"
|
||||
loop:
|
||||
- >-
|
||||
dnf --releasever=9 --best --repo=rocky-baseos --installroot=/mnt
|
||||
--setopt=install_weak_deps=False --setopt=optional_metadata_types=filelists
|
||||
groupinstall -y base core
|
||||
- ln -sf /run/NetworkManager/resolv.conf /mnt/etc/resolv.conf
|
||||
- >-
|
||||
arch-chroot /mnt dnf --releasever=9 --setopt=install_weak_deps=False
|
||||
install -y {{ bootstrap_rocky_extra }}
|
||||
register: bootstrap_result
|
||||
changed_when: bootstrap_result.rc == 0
|
||||
Reference in New Issue
Block a user