aboutsummaryrefslogtreecommitdiff
path: root/ansible/plays/wireguard-wg0-terraform.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/plays/wireguard-wg0-terraform.yml')
-rw-r--r--ansible/plays/wireguard-wg0-terraform.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/ansible/plays/wireguard-wg0-terraform.yml b/ansible/plays/wireguard-wg0-terraform.yml
new file mode 100644
index 0000000..33b4b47
--- /dev/null
+++ b/ansible/plays/wireguard-wg0-terraform.yml
@@ -0,0 +1,17 @@
+- hosts: localhost
+ connection: local
+ tasks:
+ - tags: terraform
+ copy:
+ dest: ../../terraform/dns/vpn.tf
+ content: |
+ # Generated from ansible data
+ {% for host, data in wireguard_wg0.hosts.items() %}
+ resource "linode_domain_record" "vpn-{{ host }}" {
+ domain_id = linode_domain.root.id
+ name = "{{ host }}.vpn"
+ record_type = "AAAA"
+ target = "{{ data.ipv6 }}"
+ }
+ {% endfor %}
+