demo/digitalocean: use remote-exec for config files

This commit is contained in:
Ryan Uber 2015-09-23 16:51:51 -07:00
parent c6d9652c09
commit c8b1df208e
2 changed files with 8 additions and 6 deletions

View file

@ -21,9 +21,10 @@ resource "digitalocean_droplet" "client" {
region = "${var.region}" region = "${var.region}"
ssh_keys = ["${split(",", var.ssh_keys)}"] ssh_keys = ["${split(",", var.ssh_keys)}"]
provisioner "file" { provisioner "remote-exec" {
source = "${template_file.client_config.filename}" inline = ["cat > /usr/local/etc/nomad/client.hcl <<EOF
destination = "/usr/local/etc/nomad/client.hcl" ${template_file.client_config.rendered}
EOF"]
} }
provisioner "remote-exec" { provisioner "remote-exec" {

View file

@ -19,9 +19,10 @@ resource "digitalocean_droplet" "server" {
region = "${var.region}" region = "${var.region}"
ssh_keys = ["${split(",", var.ssh_keys)}"] ssh_keys = ["${split(",", var.ssh_keys)}"]
provisioner "file" { provisioner "remote-exec" {
source = "${template_file.server_config.filename}" inline = ["cat > /usr/local/etc/nomad/server.hcl <<EOF
destination = "/usr/local/etc/nomad/server.hcl" ${template_file.server_config.rendered}
EOF"]
} }
provisioner "remote-exec" { provisioner "remote-exec" {