refactor(bootstrap): nest network fields under system.network to match main project schema

This commit is contained in:
2026-02-11 23:01:39 +01:00
parent 45c002c2dd
commit a60e6fd0d3
19 changed files with 185 additions and 175 deletions

View File

@@ -50,7 +50,7 @@
- name: Validate nested system mappings
loop:
- dns
- network
- user
- root
- luks
@@ -65,7 +65,7 @@
- name: Validate system sub-dict schemas
loop:
- dns
- network
- user
- root
- luks
@@ -171,8 +171,8 @@
- hypervisor_cfg.host | string | length > 0
- hypervisor_cfg.storage | string | length > 0
- system_cfg.id | string | length > 0
- system_cfg.network | string | length > 0
fail_msg: "Missing required Proxmox inputs. Define hypervisor.(url,username,password,host,storage) and system.(id,network)."
- system_cfg.network.bridge | string | length > 0
fail_msg: "Missing required Proxmox inputs. Define hypervisor.(url,username,password,host,storage), system.id, and system.network.bridge."
quiet: true
- name: Validate VMware hypervisor inputs
@@ -187,8 +187,8 @@
- hypervisor_cfg.datacenter | string | length > 0
- hypervisor_cfg.cluster | string | length > 0
- hypervisor_cfg.storage | string | length > 0
- system_cfg.network | string | length > 0
fail_msg: "Missing required VMware inputs. Define hypervisor.(url,username,password,datacenter,cluster,storage) and system.network."
- system_cfg.network.bridge | string | length > 0
fail_msg: "Missing required VMware inputs. Define hypervisor.(url,username,password,datacenter,cluster,storage) and system.network.bridge."
quiet: true
- name: Validate Xen hypervisor inputs
@@ -197,8 +197,8 @@
- hypervisor_type == "xen"
ansible.builtin.assert:
that:
- system_cfg.network | string | length > 0
fail_msg: "Missing required Xen inputs. Define system.network."
- system_cfg.network.bridge | string | length > 0
fail_msg: "Missing required Xen inputs. Define system.network.bridge."
quiet: true
- name: Validate virtual installer ISO requirement
@@ -322,10 +322,10 @@
label: "{{ item | to_json }}"
- name: Validate static IP requirements
when: system_cfg.ip is defined and (system_cfg.ip | string | length) > 0
when: system_cfg.network.ip is defined and (system_cfg.network.ip | string | length) > 0
ansible.builtin.assert:
that:
- system_cfg.prefix is defined
- (system_cfg.prefix | int) > 0
fail_msg: "system.prefix is required when system.ip is set."
- system_cfg.network.prefix is defined
- (system_cfg.network.prefix | int) > 0
fail_msg: "system.network.prefix is required when system.network.ip is set."
quiet: true