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}"
ssh_keys = ["${split(",", var.ssh_keys)}"]
provisioner "file" {
source = "${template_file.client_config.filename}"
destination = "/usr/local/etc/nomad/client.hcl"
provisioner "remote-exec" {
inline = ["cat > /usr/local/etc/nomad/client.hcl <<EOF
${template_file.client_config.rendered}
EOF"]
}
provisioner "remote-exec" {

View File

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