add terraform for jefke

This commit is contained in:
Pim Kunis 2023-05-04 00:23:19 +02:00
parent 1ca6edb8b8
commit 4c80a1c96f

View file

@ -15,6 +15,11 @@ provider "libvirt" {
uri = "qemu+ssh://root@atlas.hyp/system" uri = "qemu+ssh://root@atlas.hyp/system"
} }
provider "libvirt" {
alias = "jefke"
uri = "qemu+ssh://root@jefke.hyp/system"
}
resource "libvirt_pool" "iso" { resource "libvirt_pool" "iso" {
name = "iso" name = "iso"
type = "dir" type = "dir"
@ -63,3 +68,59 @@ resource "libvirt_network" "dmzbr" {
} }
autostart = true autostart = true
} }
resource "libvirt_pool" "iso_jefke" {
name = "iso"
type = "dir"
path = "/kvm/iso"
provider = libvirt.jefke
}
resource "libvirt_pool" "disk_jefke" {
name = "disk"
type = "dir"
path = "/kvm/disk"
provider = libvirt.jefke
}
resource "libvirt_pool" "init_jefke" {
name = "init"
type = "dir"
path = "/kvm/init"
provider = libvirt.jefke
}
resource "libvirt_volume" "ubuntu_jammy_jefke" {
name = "ubuntu-jammy.img"
pool = "iso"
source = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
provider = libvirt.jefke
}
resource "libvirt_volume" "debian_bullseye_jefke" {
name = "debian-bullseye.iso"
pool = "iso"
source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2"
provider = libvirt.jefke
}
resource "libvirt_volume" "debian_bookworm_jefke" {
name = "debian-bookworm.qcow2"
pool = "iso"
source = "https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.qcow2"
provider = libvirt.jefke
}
resource "libvirt_network" "dmzbr_jefke" {
name = "dmzbr"
mode = "bridge"
bridge = "dmzbr"
dhcp {
enabled = false
}
dns {
enabled = false
}
autostart = true
provider = libvirt.jefke
}