refactor: use ansible native incus connection
This commit is contained in:
@@ -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"] } }
|
||||
}
|
||||
|
||||
# -------
|
||||
|
||||
Reference in New Issue
Block a user