aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"
+}