aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-07-30 23:07:35 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2024-07-30 23:07:35 +0200
commit5ecd6c2c2586495bb23d5d57c334edcb10cd8492 (patch)
treefbaaf6fb305e953f0197e0bc917cf2d9b84fc35f
parent6cc37a8a6445e6fe4551f1a51670861756d8d5db (diff)
downloadinfra-5ecd6c2c2586495bb23d5d57c334edcb10cd8492.tar.gz
infra-5ecd6c2c2586495bb23d5d57c334edcb10cd8492.tar.bz2
infra-5ecd6c2c2586495bb23d5d57c334edcb10cd8492.tar.xz
infra-5ecd6c2c2586495bb23d5d57c334edcb10cd8492.zip
Updating vpn dns.
-rw-r--r--ansible/wg0/wireguard-wg0-terraform.yml3
-rw-r--r--terraform/dns/vpn.tf36
2 files changed, 14 insertions, 25 deletions
diff --git a/ansible/wg0/wireguard-wg0-terraform.yml b/ansible/wg0/wireguard-wg0-terraform.yml
index 33b4b47..c4c809c 100644
--- a/ansible/wg0/wireguard-wg0-terraform.yml
+++ b/ansible/wg0/wireguard-wg0-terraform.yml
@@ -7,11 +7,12 @@
content: |
# Generated from ansible data
{% for host, data in wireguard_wg0.hosts.items() %}
+ {% if data.state | default("present") == "present" %}
resource "linode_domain_record" "vpn-{{ host }}" {
domain_id = linode_domain.root.id
name = "{{ host }}.vpn"
record_type = "AAAA"
target = "{{ data.ipv6 }}"
}
+ {% endif %}
{% endfor %}
-
diff --git a/terraform/dns/vpn.tf b/terraform/dns/vpn.tf
index d73d01e..ca8f7ad 100644
--- a/terraform/dns/vpn.tf
+++ b/terraform/dns/vpn.tf
@@ -5,12 +5,6 @@ resource "linode_domain_record" "vpn-knot" {
record_type = "AAAA"
target = "fdf3:aad9:a885:0b3a::1"
}
-resource "linode_domain_record" "vpn-birgitte" {
- domain_id = linode_domain.root.id
- name = "birgitte.vpn"
- record_type = "AAAA"
- target = "fdf3:aad9:a885:0b3a::2"
-}
resource "linode_domain_record" "vpn-arius" {
domain_id = linode_domain.root.id
name = "arius.vpn"
@@ -23,36 +17,18 @@ resource "linode_domain_record" "vpn-akili" {
record_type = "AAAA"
target = "fdf3:aad9:a885:0b3a::7"
}
-resource "linode_domain_record" "vpn-malabaricus" {
- domain_id = linode_domain.root.id
- name = "malabaricus.vpn"
- record_type = "AAAA"
- target = "fdf3:aad9:a885:0b3a::8"
-}
resource "linode_domain_record" "vpn-sweetzpot-mobile" {
domain_id = linode_domain.root.id
name = "sweetzpot-mobile.vpn"
record_type = "AAAA"
target = "fdf3:aad9:a885:0b3a::9"
}
-resource "linode_domain_record" "vpn-astyanax" {
- domain_id = linode_domain.root.id
- name = "astyanax.vpn"
- record_type = "AAAA"
- target = "fdf3:aad9:a885:0b3a::10"
-}
resource "linode_domain_record" "vpn-sweetzpot-macos" {
domain_id = linode_domain.root.id
name = "sweetzpot-macos.vpn"
record_type = "AAAA"
target = "fdf3:aad9:a885:0b3a::11"
}
-resource "linode_domain_record" "vpn-android-trygvis" {
- domain_id = linode_domain.root.id
- name = "android-trygvis.vpn"
- record_type = "AAAA"
- target = "fdf3:aad9:a885:0b3a::12"
-}
resource "linode_domain_record" "vpn-hash" {
domain_id = linode_domain.root.id
name = "hash.vpn"
@@ -71,9 +47,21 @@ resource "linode_domain_record" "vpn-lhn2ix" {
record_type = "AAAA"
target = "fdf3:aad9:a885:0b3a::15"
}
+resource "linode_domain_record" "vpn-kv24ix" {
+ domain_id = linode_domain.root.id
+ name = "kv24ix.vpn"
+ record_type = "AAAA"
+ target = "fdf3:aad9:a885:0b3a::16"
+}
resource "linode_domain_record" "vpn-biwia" {
domain_id = linode_domain.root.id
name = "biwia.vpn"
record_type = "AAAA"
target = "fdf3:aad9:a885:0b3a::17"
}
+resource "linode_domain_record" "vpn-coregonus" {
+ domain_id = linode_domain.root.id
+ name = "coregonus.vpn"
+ record_type = "AAAA"
+ target = "fdf3:aad9:a885:0b3a::18"
+}