Commit f986538f authored by Alex Hanselka's avatar Alex Hanselka
Browse files

feat: add wireguard variables for ansible

parent 01afa95f
......@@ -22,6 +22,12 @@ variable "ansible_token" {
type = "string"
}
variable "wireguard_address" {
description = "Wireguard address"
type = "string"
default = ""
}
data "google_dns_managed_zone" "darkdna" {
name = "darkdna"
}
......@@ -84,8 +90,10 @@ resource "ansible_host" "hcloud-host" {
groups = "${concat(var.ansible_groups, var.hcloud_ansible_groups)}"
vars {
ansible_user = "root"
ansible_host = "${hcloud_server.generic-hcloud.ipv4_address}"
ansible_user = "root"
ansible_host = "${hcloud_server.generic-hcloud.ipv4_address}"
wireguard_address = "${var.wireguard_address}"
wireguard_endpoint = "${var.node_name}.${data.google_dns_managed_zone.darkdna.dns_name}"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment