remove support for data disks

This commit is contained in:
Pim Kunis 2023-04-26 13:22:03 +02:00
parent 1a387f3f62
commit e646053552
3 changed files with 2 additions and 37 deletions

View file

@ -39,29 +39,9 @@ runcmd:
- dhclient - dhclient
- locale-gen - locale-gen
%{ if data_disk }
device_aliases:
data: /dev/vdb
disk_setup:
data:
table_type: 'gpt'
layout: true
overwrite: false
fs_setup:
- label: 'data'
filesystem: 'ext4'
device: data.1
overwrite: false
%{ endif }
%{ if data_disk || add_data_share }
mounts:
%{ if data_disk }
- ["data.1", "/mnt/data"]
%{ endif }
%{ if add_data_share } %{ if add_data_share }
- ["data", "/mnt/data", "9p", "trans=virtio,rw,_netdev", "0", "0"] mounts:
%{ endif } - ["data", "/mnt/data", "9p", "trans=virtio,rw", "0", "0"]
%{ endif } %{ endif }
%{ if fixed_dns != "" } %{ if fixed_dns != "" }

View file

@ -14,7 +14,6 @@ locals {
use_host_cert = var.use_host_cert, use_host_cert = var.use_host_cert,
host_cert = trimspace(null_resource.cert.triggers["cert"]), host_cert = trimspace(null_resource.cert.triggers["cert"]),
private_key = tls_private_key.debian.private_key_openssh, private_key = tls_private_key.debian.private_key_openssh,
data_disk = var.data_disk != null
fixed_dns = var.fixed_dns fixed_dns = var.fixed_dns
add_data_share = var.add_data_share add_data_share = var.add_data_share
}) })
@ -106,14 +105,6 @@ resource "libvirt_domain" "debian" {
volume_id = libvirt_volume.debian.id volume_id = libvirt_volume.debian.id
} }
dynamic "disk" {
for_each = var.data_disk != null ? [1] : []
content {
volume_id = var.data_disk
}
}
dynamic "filesystem" { dynamic "filesystem" {
for_each = var.add_data_share ? [1] : [] for_each = var.add_data_share ? [1] : []

View file

@ -84,12 +84,6 @@ variable "use_host_cert" {
description = "Whether this machine should receive a SSH host certificate." description = "Whether this machine should receive a SSH host certificate."
} }
variable "data_disk" {
type = string
default = null
description = "Identifier of the machine's persistent data disk."
}
variable "fixed_address" { variable "fixed_address" {
type = string type = string
default = "" default = ""