Commit 2e55e6e5 authored by Alex Hanselka's avatar Alex Hanselka
Browse files

Merge branch 'wireguard' into 'master'

add wireguard variables for ansible

See merge request !1
parents 01afa95f f986538f
Pipeline #3313 passed with stage
in 4 minutes and 30 seconds
...@@ -22,6 +22,12 @@ variable "ansible_token" { ...@@ -22,6 +22,12 @@ variable "ansible_token" {
type = "string" type = "string"
} }
variable "wireguard_address" {
description = "Wireguard address"
type = "string"
default = ""
}
data "google_dns_managed_zone" "darkdna" { data "google_dns_managed_zone" "darkdna" {
name = "darkdna" name = "darkdna"
} }
...@@ -84,8 +90,10 @@ resource "ansible_host" "hcloud-host" { ...@@ -84,8 +90,10 @@ resource "ansible_host" "hcloud-host" {
groups = "${concat(var.ansible_groups, var.hcloud_ansible_groups)}" groups = "${concat(var.ansible_groups, var.hcloud_ansible_groups)}"
vars { vars {
ansible_user = "root" ansible_user = "root"
ansible_host = "${hcloud_server.generic-hcloud.ipv4_address}" 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