interfaces: fix the templates.

This commit is contained in:
Andrea Dell'Amico 2023-12-04 12:17:35 +01:00
parent 23955f65c8
commit 721cf5d42c
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ sysctl_custom_options: []
# sysctlfile_state: '{{ sysctl_custom_file_state }}'
ubuntu_configure_additional_interfaces: false
ubuntu_configure_additional_int_dhcp_overrides: true
ubuntu_second_int_name: "enp4s0"
ubuntu_netplan_interfaces:
- name: "{{ ubuntu_second_int_name }}"

View File

@ -2,9 +2,9 @@ network:
version: 2
ethernets:
{% for int in new_ints %}
{{ int.name }}:
dhcp4: {{ int.dhcp4 }}
{% if int.dhcp_overrides | default(true) %}
{{ int }}:
dhcp4: true
{% if ubuntu_configure_additional_int_dhcp_overrides | default(true) %}
dhcp4-overrides:
use-dns: false
use-routes: false