summaryrefslogtreecommitdiff
path: root/module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-26 21:06:24 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-26 21:06:24 +0100
commit0ae7ecd47fd76921e8e1137739497578fe703354 (patch)
treee06a9b45b5e1e7a8922cdba11b1a39188ddeeee2 /module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2
parent71010ae3fefbe897227343e44573385df9cd60cc (diff)
downloadrules-sandbox-0ae7ecd47fd76921e8e1137739497578fe703354.tar.gz
rules-sandbox-0ae7ecd47fd76921e8e1137739497578fe703354.tar.bz2
rules-sandbox-0ae7ecd47fd76921e8e1137739497578fe703354.tar.xz
rules-sandbox-0ae7ecd47fd76921e8e1137739497578fe703354.zip
Better main().
* Moving templates into their respective modules. * Supporting export type-based filtering. Probably not perfect.
Diffstat (limited to 'module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2')
-rw-r--r--module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j28
1 files changed, 8 insertions, 0 deletions
diff --git a/module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2 b/module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2
new file mode 100644
index 0000000..a3c8c40
--- /dev/null
+++ b/module/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2
@@ -0,0 +1,8 @@
+# Generated
+link_address: {{ host.ip }}
+network_cidr: {{ host.networkCidr }}
+wireguard_peers:
+ {{ host.machine.name }}:
+{%- for peer in peers %}
+ - {{ peer.fqdn }}
+{%- endfor %}