Remove ansible from terraform
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
170c5e0730
commit
e5726cf742
@ -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",
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user