---
wireguard_PersistentKeepalive: 0
wireguard_config_path: configs/{{ IP_subject_alt_name }}/wireguard
wireguard_pki_path: "{{ wireguard_config_path }}/.pki"
wireguard_interface: wg0
wireguard_port_avoid: 53
wireguard_port_actual: 51820
keys_clean_all: false
wireguard_dns_servers: >-
  {% if algo_dns_adblocking | default(false) | bool or dns_encryption | default(false) | bool %}{{ local_service_ip }}{{ ', ' + local_service_ipv6 if ipv6_support else '' }}{% else %}{% for host in dns_servers.ipv4 %}{{ host }}{% if not loop.last %},{% endif %}{% endfor %}{%- if ipv6_support %},{% for host in dns_servers.ipv6 %}{{ host }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}{% endif %}
wireguard_client_ip: >-
  {{ wireguard_network_ipv4 | ansible.utils.ipmath(index | int + 2) }}
  {{ ',' + wireguard_network_ipv6 | ansible.utils.ipmath(index | int + 2) if ipv6_support else '' }}
wireguard_server_ip: >-
  {{ wireguard_network_ipv4 | ansible.utils.ipaddr('1') }}
  {{ ',' + wireguard_network_ipv6 | ansible.utils.ipaddr('1') if ipv6_support else '' }}
