mail-server/ansible/templates/wireguard.if.j2
2024-05-29 22:06:22 +03:00

7 lines
216 B
Django/Jinja

{% set _wg = lookup('vars', inventory_hostname + '_wg') %}
# {{ ansible_managed }}
inet {{ _wg.address }} 255.255.255.0 NONE
up
!/usr/local/bin/wg setconf {{ _wg.interface }} /etc/wireguard/{{ _wg.interface }}.conf