demo/digitalocean: use remote-exec for config files
This commit is contained in:
parent
c6d9652c09
commit
c8b1df208e
|
@ -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" {
|
||||||
|
|
|
@ -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" {
|
||||||
|
|
Loading…
Reference in a new issue