Update wireguard template
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
78f202b11f
commit
410b448e37
2 changed files with 3 additions and 1 deletions
|
|
@ -15,5 +15,6 @@ wireguard_persistent_keepalive: 20
|
|||
wireguard_save_config: true
|
||||
# wireguard_endpoint_port: "51820"
|
||||
# wireguard_endpoint_ip: "x.x.x.x"
|
||||
# wireguard_allowed_ips: []
|
||||
|
||||
skip_conf: false
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ SaveConfig = {{ wireguard_save_config }}
|
|||
PublicKey = {{ hostvars[host].wireguard_public_key }}
|
||||
#AllowedIPs = 0.0.0.0/0,::/0
|
||||
{% if hostvars[host].wireguard_allowed_ips is defined %}
|
||||
AllowedIPs = {{hostvars[host].wireguard_allowed_ips}}
|
||||
AllowedIPs = {{ hostvars[host].wireguard_address.split('/')[0] }}/32, {% for wireguard_allowed_ip in hostvars[host].wireguard_allowed_ips %}{{ wireguard_allowed_ip }}{% if not loop.last %}, {% endif %}{% endfor %}
|
||||
|
||||
{% else %}
|
||||
AllowedIPs = {{ hostvars[host].wireguard_address.split('/')[0] }}/32
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue