Remove ansible from terraform
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kasper Juul Hermansen 2022-02-19 18:19:26 +01:00
parent 170c5e0730
commit e5726cf742
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23

View File

@ -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" { resource "local_file" "hosts_cfg" {
content = templatefile("${path.module}/templates/hosts.tpl", content = templatefile("${path.module}/templates/hosts.tpl",
{ {