remove data share initialization
set hypervisor host default to empty string
This commit is contained in:
parent
0857c3ac46
commit
e77d62f4a2
2 changed files with 1 additions and 23 deletions
18
debian/main.tf
vendored
18
debian/main.tf
vendored
|
@ -92,20 +92,6 @@ resource "libvirt_cloudinit_disk" "debian" {
|
|||
network_config = local.cloudinit_network_config
|
||||
}
|
||||
|
||||
resource "null_resource" "data_share" {
|
||||
connection {
|
||||
type = "ssh"
|
||||
user = "root"
|
||||
host = var.hypervisor_host
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
inline = [
|
||||
"if [ \"${var.data_share}\" != \"\"; then mkdir -p --mode=og=rwx /data/${local.domain_name}; fi"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
resource "libvirt_domain" "debian" {
|
||||
name = local.domain_name
|
||||
memory = var.memory
|
||||
|
@ -147,8 +133,4 @@ resource "libvirt_domain" "debian" {
|
|||
libvirt_cloudinit_disk.debian.id
|
||||
]
|
||||
}
|
||||
|
||||
depends_on = [
|
||||
null_resource.data_share
|
||||
]
|
||||
}
|
||||
|
|
6
debian/variables.tf
vendored
6
debian/variables.tf
vendored
|
@ -79,11 +79,7 @@ variable "ca_key" {
|
|||
|
||||
variable "data_share" {
|
||||
type = string
|
||||
default = "/mnt/data"
|
||||
}
|
||||
|
||||
variable "hypervisor_host" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "data_disk" {
|
||||
|
|
Reference in a new issue