From e5726cf742ba0c63addb4e526846b24f5e742955 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 19 Feb 2022 18:19:26 +0100 Subject: [PATCH] Remove ansible from terraform --- infrastructure/create-resources/hcloud.tf | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/infrastructure/create-resources/hcloud.tf b/infrastructure/create-resources/hcloud.tf index 391d0c0..fbea7e5 100644 --- a/infrastructure/create-resources/hcloud.tf +++ b/infrastructure/create-resources/hcloud.tf @@ -29,25 +29,6 @@ resource "hcloud_server" "serverctl_master" { } } -resource "null_resource" "configure_serverctl_master" { - count = var.serverctl_master_count - - provisioner "local-exec" { - command = "ANSIBLE_HOST_KEY_CHECKING=False /usr/bin/ansible-playbook -u root -i '${element(hcloud_server.serverctl_master.*.ipv4_address, 0)},' --private-key ${var.pvt_key} -e 'pub_key=${var.pub_key}' server-install.yml" - } - - triggers = { - always_run = timestamp() - } -} - -output "master_ipv4_addresses" { - value = { - for serverctl in hcloud_server.serverctl_master : - serverctl.name => serverctl.ipv4_address - } -} - resource "local_file" "hosts_cfg" { content = templatefile("${path.module}/templates/hosts.tpl", {