hello sorry for the late reply
this is the vagrant mailing list do you have a vagrant question? On Tue, Oct 15, 2019 at 11:09 AM Julian Zielke <[email protected]> wrote: > Hi, > > I'm currently using Terragrunt in combination with Terraform to deploy > digitalocean droplets. > > What I'm planning is to use local exec in order to run Ansbile on the > deployed host(s) afterwards. So I need to access the list of hosts somehow > but I always run into an error > saying that the variable xyz is not (yet) declared. > > Here's an Example I've tried: > > resource "digitalocean_droplet" "instance" { > image = "${var.host_image}" > name = "${var.host_name}" > region = "fra1" > size = "${var.host_sizing}" > backups = "${var.useBackups}" > tags = "${split(",", replace(var.host_tags, " ", ""))}" > ssh_keys = ["${digitalocean_ssh_key.default.fingerprint}"] > provisioner "remote-exec" { > inline = ["echo"] > > connection { > host = "${data.digitalocean_droplet.instance.ipv4_address}" > type = "ssh" > user = "root" > private_key = "${file(var.public_key)}" > } > } > } > > Any chance to accomplish my goal? > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/vagrant/issues > IRC: #vagrant on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vagrant-up/65cec1b4-203f-4f0d-bb96-5c9e8e5e137e%40googlegroups.com > <https://groups.google.com/d/msgid/vagrant-up/65cec1b4-203f-4f0d-bb96-5c9e8e5e137e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Alvaro -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez8_GjdAdKts36%3Dupbq2PTXNVHik%3DFukV8jeEK9WfWaVg%40mail.gmail.com.
