Skip to content

Commit c5a1232

Browse files
committed
Do not try to start VM
1 parent 8678c6f commit c5a1232

File tree

2 files changed

+50
-50
lines changed

2 files changed

+50
-50
lines changed

main.tf

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
locals {
1414
nodename = var.nodename == "" ? var.name_prefix : var.nodename
15-
address = libvirt_domain.node.network_interface[0].addresses[0]
15+
# address = libvirt_domain.node.network_interface[0].addresses[0]
1616
use_generated_keypair = var.ssh_private_key == "" || var.ssh_public_key == ""
1717
ssh_public_key = local.use_generated_keypair ? tls_private_key.keypair[0].public_key_openssh : var.ssh_public_key
1818
ssh_private_key = local.use_generated_keypair ? tls_private_key.keypair[0].private_key_openssh : var.ssh_private_key
@@ -52,48 +52,48 @@ resource "libvirt_volume" "root" {
5252
size = 21474836480
5353
}
5454

55-
resource "libvirt_domain" "node" {
56-
name = var.name_prefix
57-
machine = "q35"
58-
cloudinit = libvirt_cloudinit_disk.ci.id
59-
memory = 2048
60-
vcpu = 2
61-
qemu_agent = true
62-
xml {
63-
xslt = file("${path.module}/libvirt-domain.xsl")
64-
}
65-
cpu {
66-
mode = "host-passthrough"
67-
}
68-
disk {
69-
volume_id = libvirt_volume.root.id
70-
scsi = true
71-
}
72-
network_interface {
73-
network_name = var.libvirt_network_name
74-
hostname = local.nodename
75-
wait_for_lease = true
76-
}
77-
console {
78-
type = "pty"
79-
target_port = "0"
80-
target_type = "serial"
81-
}
82-
provisioner "remote-exec" {
83-
inline = [
84-
"cloud-init status --wait",
85-
templatefile("${path.module}/provision/setup-hostname.sh.tftpl", {
86-
hostname = local.nodename
87-
ipv4 = self.network_interface[0].addresses[0]
88-
}),
89-
file("${path.module}/provision/install-pve.sh"),
90-
file("${path.module}/provision/setup-interfaces-sdn.sh")
91-
]
92-
connection {
93-
type = "ssh"
94-
user = "debian"
95-
private_key = local.ssh_private_key
96-
host = self.network_interface[0].addresses[0]
97-
}
98-
}
99-
}
55+
# resource "libvirt_domain" "node" {
56+
# name = var.name_prefix
57+
# machine = "q35"
58+
# cloudinit = libvirt_cloudinit_disk.ci.id
59+
# memory = 2048
60+
# vcpu = 2
61+
# qemu_agent = true
62+
# xml {
63+
# xslt = file("${path.module}/libvirt-domain.xsl")
64+
# }
65+
# cpu {
66+
# mode = "host-passthrough"
67+
# }
68+
# disk {
69+
# volume_id = libvirt_volume.root.id
70+
# scsi = true
71+
# }
72+
# network_interface {
73+
# network_name = var.libvirt_network_name
74+
# hostname = local.nodename
75+
# wait_for_lease = true
76+
# }
77+
# console {
78+
# type = "pty"
79+
# target_port = "0"
80+
# target_type = "serial"
81+
# }
82+
# provisioner "remote-exec" {
83+
# inline = [
84+
# "cloud-init status --wait",
85+
# templatefile("${path.module}/provision/setup-hostname.sh.tftpl", {
86+
# hostname = local.nodename
87+
# ipv4 = self.network_interface[0].addresses[0]
88+
# }),
89+
# file("${path.module}/provision/install-pve.sh"),
90+
# file("${path.module}/provision/setup-interfaces-sdn.sh")
91+
# ]
92+
# connection {
93+
# type = "ssh"
94+
# user = "debian"
95+
# private_key = local.ssh_private_key
96+
# host = self.network_interface[0].addresses[0]
97+
# }
98+
# }
99+
# }

outputs.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
output "node_url" {
2-
value = "https://${local.address}:8006/"
3-
description = "Web URL of the PVE manager."
4-
}
1+
# output "node_url" {
2+
# value = "https://${local.address}:8006/"
3+
# description = "Web URL of the PVE manager."
4+
# }
55

66
output "password" {
77
value = local.use_generated_password ? random_password.root[0].result : ""

0 commit comments

Comments
 (0)