44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
---
|
|
- name: Run OS-specific bootstrap process
|
|
vars:
|
|
bootstrap_os_key: "{{ os | lower }}"
|
|
bootstrap_var_key: "{{ 'bootstrap_' + (os | lower | replace('-', '_')) }}"
|
|
bootstrap_hypervisor_key: "{{ hypervisor | default('none') | lower }}"
|
|
bootstrap_guest_agent_packages: >-
|
|
{{
|
|
['qemu-guest-agent'] if bootstrap_hypervisor_key in ['libvirt', 'proxmox']
|
|
else ['open-vm-tools'] if bootstrap_hypervisor_key == 'vmware'
|
|
else []
|
|
}}
|
|
bootstrap_guest_agent_remove_packages:
|
|
- open-vm-tools
|
|
- qemu-guest-agent
|
|
block:
|
|
- name: Include AlmaLinux bootstrap tasks
|
|
when: bootstrap_os_key == 'almalinux'
|
|
ansible.builtin.include_tasks: almalinux.yml
|
|
|
|
- name: Include ArchLinux bootstrap tasks
|
|
when: bootstrap_os_key == 'archlinux'
|
|
ansible.builtin.include_tasks: archlinux.yml
|
|
|
|
- name: Include Debian bootstrap tasks
|
|
when: bootstrap_os_key in ['debian11', 'debian12', 'debian13']
|
|
ansible.builtin.include_tasks: debian.yml
|
|
|
|
- name: Include Fedora bootstrap tasks
|
|
when: bootstrap_os_key == 'fedora'
|
|
ansible.builtin.include_tasks: fedora.yml
|
|
|
|
- name: Include Rocky bootstrap tasks
|
|
when: bootstrap_os_key == 'rocky'
|
|
ansible.builtin.include_tasks: rocky.yml
|
|
|
|
- name: Include RHEL bootstrap tasks
|
|
when: bootstrap_os_key in ['rhel8', 'rhel9', 'rhel10']
|
|
ansible.builtin.include_tasks: rhel.yml
|
|
|
|
- name: Include Ubuntu bootstrap tasks
|
|
when: bootstrap_os_key in ['ubuntu', 'ubuntu-lts']
|
|
ansible.builtin.include_tasks: ubuntu.yml
|