feat: add templated network config
This commit is contained in:
19
builds/linux/ubuntu/22-04-lts/data/network.pkrtpl.hcl
Normal file
19
builds/linux/ubuntu/22-04-lts/data/network.pkrtpl.hcl
Normal file
@@ -0,0 +1,19 @@
|
||||
network:
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
%{ if ip != null ~}
|
||||
${device}:
|
||||
dhcp4: false
|
||||
addresses:
|
||||
- ${ip}/${netmask}
|
||||
gateway4: ${gateway}
|
||||
nameservers:
|
||||
addresses:
|
||||
%{ for item in dns ~}
|
||||
- ${item}
|
||||
%{ endfor ~}
|
||||
%{ else ~}
|
||||
${device}:
|
||||
dhcp4: true
|
||||
%{ endif ~}
|
||||
@@ -6,7 +6,8 @@ autoinstall:
|
||||
locale: ${vm_os_language}
|
||||
keyboard:
|
||||
layout: ${vm_os_keyboard}
|
||||
${storage}
|
||||
${storage}
|
||||
${network}
|
||||
identity:
|
||||
hostname: ubuntu-server
|
||||
username: ${build_username}
|
||||
|
||||
Reference in New Issue
Block a user