aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/wg0/wireguard-wg0-terraform.yml3
1 files changed, 2 insertions, 1 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 %}
-