diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-23 15:05:10 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-23 15:05:10 +0100 |
commit | b8aea45af19d61a51ab0f568aee8e2e731dccaa7 (patch) | |
tree | fd8eb583f99200eb7703adfec7fd793e59b38e37 /j2/wireguard | |
parent | 2616847e01f34926f80da6b9661bf1c08e67722f (diff) | |
parent | e2f4aefa956bb06b1ee52d95ad8275757605678d (diff) | |
download | rules-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.j2 | 8 | ||||
-rw-r--r-- | j2/wireguard/inventory.j2 | 8 |
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 %} |