support fixed ip address
This commit is contained in:
parent
8b6c42e1c5
commit
0096b77f3d
4 changed files with 24 additions and 9 deletions
|
@ -1,7 +0,0 @@
|
|||
version: 2
|
||||
ethernets:
|
||||
ens3:
|
||||
dhcp4: true
|
||||
routes:
|
||||
- to: 0.0.0.0/0
|
||||
via: 192.168.30.1
|
14
files/network_config.cfg.tftpl
Normal file
14
files/network_config.cfg.tftpl
Normal 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
|
Reference in a new issue