fix dynamic provisioner
This commit is contained in:
parent
d40da1a9e8
commit
013fc774c0
2 changed files with 3 additions and 6 deletions
5
main.tf
5
main.tf
|
@ -97,12 +97,9 @@ resource "libvirt_domain" "debian" {
|
||||||
|
|
||||||
cloudinit = libvirt_cloudinit_disk.debian.id
|
cloudinit = libvirt_cloudinit_disk.debian.id
|
||||||
|
|
||||||
dynamic "local-exec" {
|
provisioner "local-exec" {
|
||||||
for_each = var.ansible_command != "" ? [1] : []
|
|
||||||
content {
|
|
||||||
command = var.ansible_command
|
command = var.ansible_command
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
replace_triggered_by = [
|
replace_triggered_by = [
|
||||||
|
|
|
@ -67,5 +67,5 @@ variable "fixed_address" {
|
||||||
|
|
||||||
variable "ansible_command" {
|
variable "ansible_command" {
|
||||||
type = string
|
type = string
|
||||||
default = ""
|
default = "true"
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue