summaryrefslogtreecommitdiff
path: root/j2/wireguard
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-23 15:05:10 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-23 15:05:10 +0100
commitb8aea45af19d61a51ab0f568aee8e2e731dccaa7 (patch)
treefd8eb583f99200eb7703adfec7fd793e59b38e37 /j2/wireguard
parent2616847e01f34926f80da6b9661bf1c08e67722f (diff)
parente2f4aefa956bb06b1ee52d95ad8275757605678d (diff)
downloadrules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.tar.gz
rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.tar.bz2
rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.tar.xz
rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'j2/wireguard')
-rw-r--r--j2/wireguard/ansible-host.j28
-rw-r--r--j2/wireguard/inventory.j28
2 files changed, 9 insertions, 7 deletions
diff --git a/j2/wireguard/ansible-host.j2 b/j2/wireguard/ansible-host.j2
index 72273ef..a3c8c40 100644
--- a/j2/wireguard/ansible-host.j2
+++ b/j2/wireguard/ansible-host.j2
@@ -1,8 +1,8 @@
# Generated
-link_address: {{ link }}
-network_cidr: {{ network }}
+link_address: {{ host.ip }}
+network_cidr: {{ host.networkCidr }}
wireguard_peers:
- {{ host.name }}:
+ {{ host.machine.name }}:
{%- for peer in peers %}
- - {{ peer }}
+ - {{ peer.fqdn }}
{%- endfor %}
diff --git a/j2/wireguard/inventory.j2 b/j2/wireguard/inventory.j2
index c7f38ee..0924bb2 100644
--- a/j2/wireguard/inventory.j2
+++ b/j2/wireguard/inventory.j2
@@ -1,5 +1,7 @@
# Generated
all:
-{%- for host in hosts %}
- {{ host.name }}: {{ host.fqdn }}
-{%- endfor %}
+ hosts:
+ {%- for host in hosts %}
+ {{ host.getName() }}:
+ ansible_host: {{ host.getFqdn() }}
+ {%- endfor %}