Configure ethernet interfaces to match those within the VMs
This commit is contained in:
parent
f6888134b8
commit
1bc8974eaf
@ -77,6 +77,7 @@ resource "libvirt_cloudinit_disk" "freeipa_init" {
|
||||
pool = libvirt_pool.vm_storage_pool.name
|
||||
user_data = data.template_file.user_data.rendered
|
||||
network_config = templatefile("${path.module}/templates/network_config.cfg.tpl", {
|
||||
interface_name = "etho0"
|
||||
ip_address = "172.30.1.85"
|
||||
gateway_ip = "172.30.1.254"
|
||||
dns_ip = "172.30.1.85"
|
||||
@ -88,6 +89,7 @@ resource "libvirt_cloudinit_disk" "portfolio_init" {
|
||||
pool = libvirt_pool.vm_storage_pool.name
|
||||
user_data = data.template_file.user_data.rendered
|
||||
network_config = templatefile("${path.module}/templates/network_config.cfg.tpl", {
|
||||
interface_name = "ens3"
|
||||
ip_address = "172.30.1.93"
|
||||
gateway_ip = "172.30.1.254"
|
||||
dns_ip = "172.30.1.85"
|
||||
@ -99,6 +101,7 @@ resource "libvirt_cloudinit_disk" "minecraft_init" {
|
||||
pool = libvirt_pool.vm_storage_pool.name
|
||||
user_data = data.template_file.user_data.rendered
|
||||
network_config = templatefile("${path.module}/templates/network_config.cfg.tpl", {
|
||||
interface_name = "ens3"
|
||||
ip_address = "172.30.1.91"
|
||||
gateway_ip = "172.30.1.254"
|
||||
dns_ip = "172.30.1.85"
|
||||
@ -110,6 +113,7 @@ resource "libvirt_cloudinit_disk" "navidrome_init" {
|
||||
pool = libvirt_pool.vm_storage_pool.name
|
||||
user_data = data.template_file.user_data.rendered
|
||||
network_config = templatefile("${path.module}/templates/network_config.cfg.tpl", {
|
||||
interface_name = "ens3"
|
||||
ip_address = "172.30.1.92"
|
||||
gateway_ip = "172.30.1.254"
|
||||
dns_ip = "172.30.1.85"
|
||||
@ -193,7 +197,7 @@ resource "libvirt_domain" "navidrome_vm" {
|
||||
cloudinit = libvirt_cloudinit_disk.navidrome_init.id
|
||||
network_interface {
|
||||
bridge = "br0"
|
||||
mac = "52:54:00:ef:65"
|
||||
mac = "52:54:00:ee:ef:65"
|
||||
}
|
||||
console {
|
||||
type = "pty"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#cloud-config
|
||||
version: 2
|
||||
ethernets:
|
||||
eth0:
|
||||
${interface_name}:
|
||||
dhcp4: no
|
||||
addresses:
|
||||
- ${ip_address}/24
|
||||
|
||||
Loading…
Reference in New Issue
Block a user