support fixed ip address

This commit is contained in:
Pim Kunis 2023-04-07 18:05:37 +02:00
parent 8b6c42e1c5
commit 0096b77f3d
4 changed files with 24 additions and 9 deletions

View file

@ -1,7 +0,0 @@
version: 2
ethernets:
ens3:
dhcp4: true
routes:
- to: 0.0.0.0/0
via: 192.168.30.1

View file

@ -0,0 +1,14 @@
version: 2
ethernets:
ens3:
%{ if fixed_address }
dhcp4: false
addresses:
- "${fixed_address}"
%{ else }
dhcp4: true
%{ endif }
dhcp4: true
routes:
- to: 0.0.0.0/0
via: 192.168.30.1