diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-02-03 16:35:48 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-02-03 16:35:48 +0100 |
commit | bafe762ac01d16904c18404283027e426e19bc73 (patch) | |
tree | c22688ad186f5ce635f525704c5035f91b983b68 /modules/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2 | |
parent | 91abd0b04320a9c9d932df195aca38c1cacfcc5a (diff) | |
download | rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.tar.gz rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.tar.bz2 rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.tar.xz rules-sandbox-bafe762ac01d16904c18404283027e426e19bc73.zip |
Code reorganization.
Moving main code to src, keeping modules in modules/
Diffstat (limited to 'modules/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2')
-rw-r--r-- | modules/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2 b/modules/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2 new file mode 100644 index 0000000..6cb3a05 --- /dev/null +++ b/modules/ri-wireguard/src/main/resources/templates/wireguard/ansible-host.j2 @@ -0,0 +1,12 @@ +# Generated +wireguard_port: {{ host.publicPort }} +link_address: {{ host.ip }} +network_cidr: {{ host.networkCidr }} +wireguard_peers: +{%- for peer in peers %} + {{ peer.machine.name }}: + public_address: {{ peer.publicName }} + public_port: {{ peer.publicPort }} + gateway: {{ peer.ip }} + network: {{ peer.networkCidr }} +{%- endfor %} |