@@ -1,30 +1,5 @@
# All generic output goes here
-locals {
- ssh_key_i = format(
- " %s%s ",
- var.ssh_config_pubkey_file != "" ? "-i " : "",
- var.ssh_config_pubkey_file != "" ? replace(var.ssh_config_pubkey_file, ".pub", "") : "",
- )
-}
-
-data "null_data_source" "group_hostnames_and_ips" {
- count = local.kdevops_num_boxes
- inputs = {
- value = format(
- "%30s : ssh %s@%s %s ",
- element(var.kdevops_nodes, count.index),
- var.ssh_config_user,
- element(aws_eip.kdevops_eip.*.public_ip, count.index),
- local.ssh_key_i,
- )
- }
-}
-
-output "login_using" {
- value = data.null_data_source.group_hostnames_and_ips.*.outputs
-}
-
# Each provider's output.tf needs to define a public_ip_map. This
# map is used to build the Ansible controller's ssh configuration.
# Each map entry contains the node's hostname and public IP address.
deleted file mode 120000
@@ -1 +0,0 @@
-../update_ssh_config.tf
\ No newline at end of file
@@ -20,24 +20,6 @@ output "kdevops_public_ip_addresses" {
value = data.azurerm_public_ip.public_ips.*.ip_address
}
-locals {
- ssh_key_i = format(" %s%s ", var.ssh_config_pubkey_file != "" ? "-i " : "", var.ssh_config_pubkey_file != "" ? replace(var.ssh_config_pubkey_file, ".pub", "") : "")
-}
-
-data "null_data_source" "group_hostnames_and_ips" {
- count = local.kdevops_num_boxes
- inputs = {
- # In theory using "${self.triggers["name"]}" and "${self.triggersp["ip"]}"
- # would be nice but it is not supported in this context, only in the
- # provisioner and connection contexts.
- value = "${format("%30s : ssh %s@%s %s ", element(azurerm_linux_virtual_machine.kdevops_vm.*.name, count.index), var.ssh_config_user, element(azurerm_public_ip.kdevops_publicip.*.ip_address, count.index), local.ssh_key_i)}"
- }
-}
-
-output "login_using" {
- value = data.null_data_source.group_hostnames_and_ips.*.outputs
-}
-
# Each provider's output.tf needs to define a public_ip_map. This
# map is used to build the Ansible controller's ssh configuration.
# Each map entry contains the node's hostname and public IP address.
deleted file mode 120000
@@ -1 +0,0 @@
-../update_ssh_config.tf
\ No newline at end of file
@@ -1,29 +1,4 @@
-locals {
- ssh_key_i = format(" %s%s ", var.ssh_config_pubkey_file != "" ? "-i " : "", var.ssh_config_pubkey_file != "" ? replace(var.ssh_config_pubkey_file, ".pub", "") : "")
- network_interfaces = google_compute_instance.kdevops_instances.*.network_interface
- access_configs = [
- for net_interface in local.network_interfaces :
- net_interface[0].access_config
- ]
- ipv4s = [
- for access_config in local.access_configs :
- access_config[0].nat_ip
- ]
-}
-
-data "null_data_source" "group_hostnames_and_ips" {
- count = local.kdevops_num_boxes
- inputs = {
- # In theory using "${self.triggers["name"]}" and "${self.triggersp["ip"]}"
- # would be nice but it is not supported in this context, only in the
- # provisioner and connection contexts.
- value = "${format("%30s : ssh %s@%s %s ", element(google_compute_instance.kdevops_instances.*.name, count.index), var.ssh_config_user, element(local.ipv4s, count.index), local.ssh_key_i)}"
- }
-}
-
-output "login_using" {
- value = data.null_data_source.group_hostnames_and_ips.*.outputs
-}
+# All generic output goes here
# Each provider's output.tf needs to define a public_ip_map. This
# map is used to build the Ansible controller's ssh configuration.
deleted file mode 120000
@@ -1 +0,0 @@
-../update_ssh_config.tf
\ No newline at end of file
deleted file mode 120000
@@ -1 +0,0 @@
-../update_ssh_config.tf
\ No newline at end of file
@@ -1,3 +1,5 @@
+# All generic output goes here
+
data "null_data_source" "group_hostnames_and_ips" {
count = local.kdevops_num_boxes
inputs = {
deleted file mode 120000
@@ -1 +0,0 @@
-../update_ssh_config.tf
\ No newline at end of file
deleted file mode 100644
@@ -1,17 +0,0 @@
-module "ssh_config_update_host_entries" {
- source = "linux-kdevops/add-host-ssh-config/kdevops"
- version = "3.0.0"
-
- ssh_config = var.ssh_config
- update_ssh_config_enable = var.ssh_config_update
- cmd = "update"
- shorthosts = join(",", slice(local.shorthosts, 0, local.kdevops_num_boxes))
- hostnames = join(",", slice(local.ipv4s, 0, local.kdevops_num_boxes))
- ports = "22"
- user = var.ssh_config_user == "" ? "" : var.ssh_config_user
- id = replace(var.ssh_config_pubkey_file, ".pub", "")
- strict = var.ssh_config_use_strict_settings ? "true" : ""
- use_backup = !var.ssh_config_backup || var.ssh_config == "/dev/null" ? "" : "true"
- backup_postfix = "kdevops"
- kexalgorithms = var.ssh_config_kexalgorithms == "" ? "" : var.ssh_config_kexalgorithms
-}