Simple terraform+ansible configuration to quickly spin up a development Docker swarm on my homeserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
data "template_file" "user_data" { count = var.node_count template = file("${path.module}/files/user_data.cfg") vars = { pubkey = file("~/.ssh/id_rsa.pub") } }
data "template_file" "meta_data" { count = var.node_count template = file("${path.module}/files/meta_data.cfg") vars = { hostname = "swarm-${count.index + 1}" } }
resource "libvirt_cloudinit_disk" "cidata" { count = var.node_count name = "swarm-${count.index + 1}-cidata.iso" user_data = data.template_file.user_data[count.index].rendered meta_data = data.template_file.meta_data[count.index].rendered }
|