Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 685 Bytes

README.md

File metadata and controls

33 lines (30 loc) · 685 Bytes

How usage

Download img from https://cloud-images.ubuntu.com/ in directory ./images edit images.tf

resource "libvirt_volume" "ubuntu-2404" {
  name   = "ubuntu-2404"
  source = "./images/ubuntu_2404.img"
}

and volumes.tf

resource "libvirt_volume" "volumes" {
  base_volume_id = resource.libvirt_volume.ubuntu-2404.id
}

open locals.tf and edit hosts variable

example

  network-cidr ="10.10.10.0/24"
   hosts = [
        {
            ip = cidrhost(local.network-cidr, 100) # equals 10.10.10.100
            name = "master"
        },
        {
            ip = cidrhost(local.network-cidr, 199) # equals  10.10.10.199
            name = "nfs"
        }
    ]