Fudge

infrastructure / terraform / inventory.tf

Commits | bovarysme Add instructions to upgrade OpenBSD in README.md Committed on Oct 18, 2020

389 B | Download

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data "template_file" "inventory" {
  template = "${file("inventory.tpl")}"

  vars = {
    main_ip = "${vultr_server.puffer.main_ip}"
  }
}

resource "null_resource" "generate_inventory" {
  triggers = {
    template = "${data.template_file.inventory.rendered}"
  }

  provisioner "local-exec" {
    command = "echo '${data.template_file.inventory.rendered}' > ../ansible/vultr.ini"
  }
}