diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2020-10-28 00:44:37 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2020-10-28 00:44:37 +0100 |
commit | 032a4eece0c72a8111efda04766770de93b34cf8 (patch) | |
tree | 284ccca0d7d2f545c2449348a67cada7fd76d55c /ansible/plays | |
parent | 22b0be766ce72a6449327cbf36d273886aa76ab3 (diff) | |
download | infra-032a4eece0c72a8111efda04766770de93b34cf8.tar.gz infra-032a4eece0c72a8111efda04766770de93b34cf8.tar.bz2 infra-032a4eece0c72a8111efda04766770de93b34cf8.tar.xz infra-032a4eece0c72a8111efda04766770de93b34cf8.zip |
linode teraform <3.
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 - |