aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/group_vars/all/linode-dns.yml28
-rw-r--r--ansible/plays/wireguard-wg0-terraform.yml17
-rw-r--r--ansible/plays/wireguard-wg0.yml1
3 files changed, 33 insertions, 13 deletions
diff --git a/ansible/group_vars/all/linode-dns.yml b/ansible/group_vars/all/linode-dns.yml
index 99d0d5f..8f4d14d 100644
--- a/ansible/group_vars/all/linode-dns.yml
+++ b/ansible/group_vars/all/linode-dns.yml
@@ -1,13 +1,17 @@
$ANSIBLE_VAULT;1.1;AES256
-62623736386330363663393335373462393837373030303932656338623037336433613563323763
-6332316437353338353832633031336533396235333638640a653666383835636635323938656134
-38633531303037643061363434646265336364613737376633646666376564656531333433663236
-3636646665613336620a663531313739663562313264306334393463323437643265616530653138
-62626230393139623233313930636137626233363737636435633737363432333235663035363634
-39343762346536343137653566616634363361396635656630633864616165646334623636376637
-62386465393339643139646437663531613063313635333064343432303137366664376637333930
-38303338616235313666383765636137656665363530393165313932623533663264333732646166
-34663163613031323263356333616336346261363530643438663262366364346437636537653061
-39663239393866396630326263653933363466343562313435373865613431633962643264353965
-65316536663566323930376335323635303634306434396136313366363130316231616431316331
-61643136303631333237
+32613137363737323032353466633435666631323539363839633637666636326337363665326666
+3436386634663232663533303063313430633061323737350a383137343930626439613835376465
+63306535373732363137393461353164333261633735646639363030343961643832633839613765
+3630313535616264660a316437326231656332313833343663383662623438666463613537363436
+31646663356231373036663335633361353633333134336664303230366664396432623763616531
+37643962383431663333616338303239343535303563303238363232323963643866653166373366
+33333535636163306666663539656236363439323936383831326336386134333963623861316263
+34313334363135373262663864333339376639333832363433636232626535316562663239656139
+39323266663062623461343062333436343262633736373830323733653561623336333535343136
+33643137323035376233636638366439366535383364333635643464323036613238653237666239
+34396661633233626265663965653666653333666365636331623062613034633164333437386534
+64373733386232303739646132613435666430313730626661636263613461393661613338626333
+61363032616339626330376533626461363231323833663131636661366465623063316537353731
+38376432393735656537313039623135653032343631333761666639633563636535616437393163
+31626433323061373338636162666334363937623339643364663263316535303336623338363337
+37626330626338353733
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
-