refactor(bootstrap,configuration): add per-role _normalize.yml for platform resolution
This commit is contained in:
24
roles/bootstrap/tasks/_normalize.yml
Normal file
24
roles/bootstrap/tasks/_normalize.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
# Resolve the OS-specific variable namespace and task file for the bootstrap role.
|
||||
- name: Validate OS is supported for bootstrap
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- os is defined
|
||||
- os in bootstrap_os_task_map
|
||||
fail_msg: >-
|
||||
Unsupported OS '{{ os | default("undefined") }}' for bootstrap.
|
||||
Supported: {{ bootstrap_os_task_map | dict2items | map(attribute='key') | join(', ') }}
|
||||
quiet: true
|
||||
vars:
|
||||
bootstrap_os_task_map:
|
||||
almalinux: _dnf_family.yml
|
||||
alpine: alpine.yml
|
||||
archlinux: archlinux.yml
|
||||
debian: debian.yml
|
||||
fedora: _dnf_family.yml
|
||||
opensuse: opensuse.yml
|
||||
rocky: _dnf_family.yml
|
||||
rhel: rhel.yml
|
||||
ubuntu: ubuntu.yml
|
||||
ubuntu-lts: ubuntu.yml
|
||||
void: void.yml
|
||||
Reference in New Issue
Block a user