refactor(bootstrap): nest network fields under system.network to match main project schema
This commit is contained in:
@@ -4,14 +4,14 @@ network:
|
||||
id0:
|
||||
match:
|
||||
macaddress: "{{ virtualization_mac_address }}"
|
||||
{% set has_static = system_cfg.ip is defined and system_cfg.ip | string | length %}
|
||||
{% set dns_list = system_cfg.dns.servers | default([]) %}
|
||||
{% set search_list = system_cfg.dns.search | default([]) %}
|
||||
{% set has_static = system_cfg.network.ip is defined and system_cfg.network.ip | string | length %}
|
||||
{% set dns_list = system_cfg.network.dns.servers | default([]) %}
|
||||
{% set search_list = system_cfg.network.dns.search | default([]) %}
|
||||
{% if has_static %}
|
||||
addresses:
|
||||
- "{{ system_cfg.ip }}/{{ system_cfg.prefix }}"
|
||||
{% if system_cfg.gateway is defined and system_cfg.gateway | string | length %}
|
||||
gateway4: "{{ system_cfg.gateway }}"
|
||||
- "{{ system_cfg.network.ip }}/{{ system_cfg.network.prefix }}"
|
||||
{% if system_cfg.network.gateway is defined and system_cfg.network.gateway | string | length %}
|
||||
gateway4: "{{ system_cfg.network.gateway }}"
|
||||
{% endif %}
|
||||
{% else %}
|
||||
dhcp4: true
|
||||
|
||||
Reference in New Issue
Block a user