diff options
Diffstat (limited to 'ansible/plays')
-rw-r--r-- | ansible/plays/wireguard-wg0-terraform.yml | 17 | ||||
-rw-r--r-- | ansible/plays/wireguard-wg0.yml | 1 |
2 files changed, 17 insertions, 1 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 %} + diff --git a/ansible/plays/wireguard-wg0.yml b/ansible/plays/wireguard-wg0.yml index 578fc81..a6f6653 100644 --- a/ansible/plays/wireguard-wg0.yml +++ b/ansible/plays/wireguard-wg0.yml @@ -3,4 +3,3 @@ roles: - role: wireguard wireguard__name: wireguard_wg0 - |