Reorganize network spec to more accurately reflect settings

This commit is contained in:
2021-11-06 21:37:15 -04:00
parent 2cff4e4354
commit fe0cd3ab67
4 changed files with 66 additions and 61 deletions

View File

@@ -14,14 +14,16 @@ DNS={{ server }}
{% if item.value.bond is defined %}
Bond={{ item.value.bond }}
{% endif %}
{% if item.value.dhcp | default(false) %}
{% if not item.value.dhcp | default(false) %}
{% if item.value.gateway is defined %}
Gateway={{ item.value.gateway | ansible.netcommon.ipaddr('address') }}
{% for address in item.value.addresses %}
{% endif %}
{% for address in item.value.addresses | default([]) %}
Address={{ address | ansible.netcommon.ipaddr('host/prefix') }}
{% endfor %}
{% endif %}
{% for interface in skylab_networking.interfaces.keys() %}
{% for interface in skylab_networking.keys() %}
{% if interface.startswith(item.key) and interface.partition('.')[2] | regex_search('^[0-9]{1,4}$') and interface != item.key %}
VLAN={{ interface }}
{% endif %}