add expand to two hypervisors

This commit is contained in:
Pim Kunis 2023-05-04 12:29:29 +02:00
parent d8787fa9a6
commit ed6723e1da
11 changed files with 105 additions and 43 deletions

View file

@ -15,20 +15,68 @@ provider "libvirt" {
uri = "qemu+ssh://root@atlas.hyp/system"
}
provider "libvirt" {
alias = "jefke"
uri = "qemu+ssh://root@jefke.hyp/system"
}
module "manager" {
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
#source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
source = "/home/pim/repos/tf-modules/debian"
name = "maestro"
domain_name = "tf-maestro"
memory = 1024
mac = "CA:FE:C0:FF:EE:08"
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "workers" {
for_each = {
worker1 = "tf-worker1"
module "swarmpub1" {
#source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
source = "/home/pim/repos/tf-modules/debian"
name = "swarmpub1"
domain_name = "tf-swarmpub1"
memory = 1024 * 5
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpriv1" {
#source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
source = "/home/pim/repos/tf-modules/debian"
name = "swarmpriv1"
domain_name = "tf-swarmpriv1"
memory = 1024 * 5
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpub2" {
#source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
source = "/home/pim/repos/tf-modules/debian"
name = "swarmpub2"
domain_name = "tf-swarmpub2"
memory = 1024 * 3
hypervisor_host = "jefke.hyp"
providers = {
libvirt = libvirt.jefke
}
}
module "swarmpriv2" {
#source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
source = "/home/pim/repos/tf-modules/debian"
name = "swarmpriv2"
domain_name = "tf-swarmpriv2"
memory = 1024 * 3
hypervisor_host = "jefke.hyp"
providers = {
libvirt = libvirt.jefke
}
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
name = each.key
domain_name = each.value
memory = 1024 * 3
}