Revert "remove lewis from hypervisors"

This reverts commit 3af593674e.
This commit is contained in:
Pim Kunis 2023-05-22 18:50:48 +02:00
parent 3af593674e
commit 287fff41b4
4 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,5 @@
apt_install_packages:
- qemu-kvm
- libvirt-daemon-system
- sudo
- bridge-utils

View file

@ -0,0 +1,12 @@
deploy_ssh_certificates:
- name: ssh_user_ed25519_key
type: user
key_type: ed25519
signing_key: hyp_user
host: lewis.hyp
principals: hypervisor
- name: ssh_host_ed25519_key
type: host
key_type: ed25519
signing_key: hyp_host
host: lewis.hyp

View file

@ -6,3 +6,5 @@ all:
ansible_host: atlas.hyp
jefke:
ansible_host: jefke.hyp
lewis:
ansible_host: lewis.hyp

View file

@ -20,6 +20,11 @@ provider "libvirt" {
uri = "qemu+ssh://root@jefke.hyp/system"
}
provider "libvirt" {
alias = "lewis"
uri = "qemu+ssh://root@lewis.hyp/system"
}
resource "libvirt_pool" "iso" {
name = "iso"
type = "dir"
@ -124,3 +129,59 @@ resource "libvirt_network" "dmzbr_jefke" {
autostart = true
provider = libvirt.jefke
}
resource "libvirt_pool" "iso_lewis" {
name = "iso"
type = "dir"
path = "/kvm/iso"
provider = libvirt.lewis
}
resource "libvirt_pool" "disk_lewis" {
name = "disk"
type = "dir"
path = "/kvm/disk"
provider = libvirt.lewis
}
resource "libvirt_pool" "init_lewis" {
name = "init"
type = "dir"
path = "/kvm/init"
provider = libvirt.lewis
}
resource "libvirt_volume" "ubuntu_jammy_lewis" {
name = "ubuntu-jammy.img"
pool = "iso"
source = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
provider = libvirt.lewis
}
resource "libvirt_volume" "debian_bullseye_lewis" {
name = "debian-bullseye.iso"
pool = "iso"
source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2"
provider = libvirt.lewis
}
resource "libvirt_volume" "debian_bookworm_lewis" {
name = "debian-bookworm.qcow2"
pool = "iso"
source = "https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.qcow2"
provider = libvirt.lewis
}
resource "libvirt_network" "dmzbr_lewis" {
name = "dmzbr"
mode = "bridge"
bridge = "dmzbr"
dhcp {
enabled = false
}
dns {
enabled = false
}
autostart = true
provider = libvirt.lewis
}