refactor: use ansible native incus connection

This commit is contained in:
2026-06-23 21:17:21 +01:00
parent f58488e5fd
commit c00faad987
5 changed files with 32 additions and 93 deletions
-26
View File
@@ -83,17 +83,6 @@ resource "incus_instance" "master" {
type = "agent"
}
file {
source_path = "bootstrap.sh"
target_path = "/bootstrap.sh"
}
file {
source_path = "../ansible/.ssh/key.pub"
target_path = "/root/.ssh/authorized_keys"
create_directories = true
}
device {
name = "eth0"
type = "nic"
@@ -113,8 +102,6 @@ resource "incus_instance" "master" {
"source" = incus_storage_volume.master[count.index].name
}
}
exec = { "00-init" = { command = ["/bootstrap.sh"] } }
}
resource "incus_storage_volume" "master" {
@@ -147,17 +134,6 @@ resource "incus_instance" "worker" {
type = "agent"
}
file {
source_path = "bootstrap.sh"
target_path = "/bootstrap.sh"
}
file {
source_path = "../ansible/.ssh/key.pub"
target_path = "/root/.ssh/authorized_keys"
create_directories = true
}
device {
name = "eth0"
type = "nic"
@@ -167,8 +143,6 @@ resource "incus_instance" "worker" {
"ipv4.address" = cidrhost(local.network_cidr, 3 + (2 * count.index))
}
}
exec = { "00-init" = { command = ["/bootstrap.sh"] } }
}
# -------