feat(bootstrap): accept extra_addresses on network interfaces

This commit is contained in:
2026-09-29 09:20:39 +02:00
parent 5a43c9a29e
commit 36ba36fd21
7 changed files with 33 additions and 1 deletions
@@ -467,6 +467,21 @@
loop_control:
label: "{{ item | to_json }}"
# A string here would iterate into one address per character in every network renderer.
- name: Validate network interfaces extra_addresses
when: item.extra_addresses is defined
ansible.builtin.assert:
that:
- item.extra_addresses is not string
- item.extra_addresses is iterable
- item.ip | default('') | string | length > 0
- item.extra_addresses | reject('match', '^(\\d{1,3}\\.){3}\\d{1,3}/\\d{1,2}$') | list | length == 0
fail_msg: "system.network.interfaces[].extra_addresses must be a list of IPv4 CIDRs (192.0.2.10/24) on an entry that also sets 'ip'."
quiet: true
loop: "{{ system_cfg.network.interfaces | default([]) }}"
loop_control:
label: "{{ item | to_json }}"
- name: Validate hostname format
ansible.builtin.assert:
that: