Skip to content

Commit

Permalink
create cloudinit_disk only for ubuntu1804
Browse files Browse the repository at this point in the history
  • Loading branch information
MalloZup committed Oct 17, 2018
1 parent 0ddaf11 commit d499a7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/libvirt/host/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ data "template_file" "user_data" {
resource "libvirt_cloudinit_disk" "minimalconf" {
name = "${var.base_configuration["name_prefix"]}${var.name}${var.count > 1 ? "-${count.index + 1}" : ""}-minimalconf.iso"
user_data = "${data.template_file.user_data.rendered}"
// this is the hcl way of comparing substrings..
count = "${replace(var.image, "ubuntu-1804", "") != var.image ? 1 : 0}"
}


Expand Down

0 comments on commit d499a7c

Please sign in to comment.