refactor(bootstrap,configuration,environment): add defaults/main.yml and extract hardcoded values
This commit is contained in:
7
roles/configuration/defaults/main.yml
Normal file
7
roles/configuration/defaults/main.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
# Network configuration dispatch — maps OS name to the task file
|
||||
# that writes network config. Default (NetworkManager) applies to
|
||||
# all OSes not explicitly listed.
|
||||
configuration_network_task_map:
|
||||
alpine: network_alpine.yml
|
||||
void: network_void.yml
|
||||
@@ -30,8 +30,4 @@
|
||||
fail_msg: Failed to detect any network interfaces.
|
||||
|
||||
- name: Configure networking
|
||||
vars:
|
||||
configuration_network_task_map:
|
||||
alpine: network_alpine.yml
|
||||
void: network_void.yml
|
||||
ansible.builtin.include_tasks: "{{ configuration_network_task_map[os] | default('network_nm.yml') }}"
|
||||
|
||||
Reference in New Issue
Block a user