diff --git a/main.tf b/main.tf index ea7089c..4be968d 100644 --- a/main.tf +++ b/main.tf @@ -97,11 +97,8 @@ resource "libvirt_domain" "debian" { cloudinit = libvirt_cloudinit_disk.debian.id - dynamic "local-exec" { - for_each = var.ansible_command != "" ? [1] : [] - content { - command = var.ansible_command - } + provisioner "local-exec" { + command = var.ansible_command } lifecycle { diff --git a/variables.tf b/variables.tf index e04cdc8..2c2ce68 100644 --- a/variables.tf +++ b/variables.tf @@ -67,5 +67,5 @@ variable "fixed_address" { variable "ansible_command" { type = string - default = "" + default = "true" }