mirror of
https://github.com/pikami/mail-server.git
synced 2026-06-15 16:56:58 +01:00
Extract playbook actions to roles
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# {{ ansible_managed }}
|
||||
[Interface]
|
||||
PrivateKey = {{ wireguard.private_key }}
|
||||
ListenPort = {{ wireguard.port }}
|
||||
|
||||
{% for peer in wireguard.peers %}
|
||||
[Peer]
|
||||
# {{ peer.name }}
|
||||
PublicKey = {{ peer.public_key }}
|
||||
Endpoint = {{ peer.endpoint }}
|
||||
AllowedIPs = {{ peer.allowed_ips }}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,5 @@
|
||||
# {{ ansible_managed }}
|
||||
inet {{ wireguard.address }} 255.255.255.0 NONE
|
||||
up
|
||||
|
||||
!/usr/local/bin/wg setconf {{ wireguard.interface }} /etc/wireguard/{{ wireguard.interface }}.conf
|
||||
Reference in New Issue
Block a user