Skip to content

Commit

Permalink
reverted inventory private param change
Browse files Browse the repository at this point in the history
  • Loading branch information
andersla committed May 4, 2018
1 parent 3ce5e39 commit 6290758
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/inventory/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ locals {
edge_private_ip = "${split(",", length(var.edge_private_ip) == 0 ? join(",", list("")) : join(",", var.edge_private_ip))}"

# Format list of different node types
masters = "${join("\n",formatlist("%s ansible_host=%s ansible_user=%s private_ip=%s", local.master_hostnames, local.master_public_ip, var.ssh_user, local.master_private_ip ))}"
nodes = "${join("\n",formatlist("%s ansible_host=%s ansible_user=%s private_ip=%s", local.node_hostnames, local.node_public_ip, var.ssh_user, local.node_private_ip ))}"
pure_edges = "${join("\n",formatlist("%s ansible_host=%s ansible_user=%s private_ip=%s", local.edge_hostnames, local.edge_public_ip, var.ssh_user, local.edge_private_ip ))}"
masters = "${join("\n",formatlist("%s ansible_host=%s ansible_user=%s", local.master_hostnames , local.master_public_ip, var.ssh_user ))}"
nodes = "${join("\n",formatlist("%s ansible_host=%s ansible_user=%s", local.node_hostnames , local.node_public_ip, var.ssh_user))}"
pure_edges = "${join("\n",formatlist("%s ansible_host=%s ansible_user=%s", local.edge_hostnames , local.edge_public_ip, var.ssh_user))}"

# Add master to edges if that is the case
edges = "${var.master_as_edge == true ? "${format("%s\n%s", local.masters, local.pure_edges)}" : local.pure_edges}"
Expand Down

0 comments on commit 6290758

Please sign in to comment.