feat: add network templates and vars
This commit is contained in:
5
builds/linux/centos/9-stream/data/network.pkrtpl.hcl
Normal file
5
builds/linux/centos/9-stream/data/network.pkrtpl.hcl
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
%{ if ip != null ~}
|
||||||
|
network --device=${device} --bootproto=static --ip=${ip} --netmask=${cidrnetmask("${ip}/${netmask}")} --gateway=${gateway} --nameserver=${join(",", dns)}
|
||||||
|
%{ else ~}
|
||||||
|
network --device=${device} --bootproto=dhcp
|
||||||
|
%{ endif ~}
|
||||||
36
builds/linux/centos/9-stream/variables-network.pkr.hcl
Normal file
36
builds/linux/centos/9-stream/variables-network.pkr.hcl
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
DESCRIPTION:
|
||||||
|
CentOS Stream 9 network variables used by the Packer Plugin for Proxmox (proxmox-iso).
|
||||||
|
*/
|
||||||
|
|
||||||
|
// VM Network Settings
|
||||||
|
|
||||||
|
variable "vm_network_device" {
|
||||||
|
type = string
|
||||||
|
description = "The network device of the VM."
|
||||||
|
default = "ens192"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vm_ip_address" {
|
||||||
|
type = string
|
||||||
|
description = "The IP address of the VM (e.g. 172.16.100.192)."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vm_ip_netmask" {
|
||||||
|
type = number
|
||||||
|
description = "The netmask of the VM (e.g. 24)."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vm_ip_gateway" {
|
||||||
|
type = string
|
||||||
|
description = "The gateway of the VM (e.g. 172.16.100.1)."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "vm_dns_list" {
|
||||||
|
type = list(string)
|
||||||
|
description = "The nameservers of the VM."
|
||||||
|
default = []
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user