2023-03-01 22:52:00 +01:00
|
|
|
---
|
|
|
|
# vars file for wireguard
|
|
|
|
_wireguard_interface_addr: "{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}/{{ ansible_default_ipv4.netmask }}"
|
2023-03-15 22:44:06 +01:00
|
|
|
wireguard_server_ip: "{{ wireguard_address | ipaddr('network') | ipmath(1) }}"
|
|
|
|
wireguard_subnetmask: "{{ wireguard_address | ipaddr('prefix') }}"
|
|
|
|
wireguard_peers_allowed_ips: "{{ ([(_wireguard_interface_addr | ipaddr('network/prefix'))] + (wireguard_additional_routes | default([]))) | join(\", \") }}"
|