Infra_mgmt/roles/wireguard/vars/main.yml

6 lines
472 B
YAML
Raw Permalink Normal View History

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 }}"
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(\", \") }}"