Fix networkd templating integration and access permissions

This commit is contained in:
2021-11-06 01:19:37 -04:00
parent d24a9b2713
commit f66a1fb8cc
2 changed files with 86 additions and 90 deletions

View File

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