diff options
| author | 2022-02-10 22:56:07 +0000 | |
|---|---|---|
| committer | 2022-02-11 01:16:15 +0000 | |
| commit | 1591849c579ad7601c86da40ac172587d4e1d10b (patch) | |
| tree | 997915053531c80f04f313d61cafccb43aeb25c0 | |
| parent | Add podman role and improve playbook organization (diff) | |
Add PostUp directive for routing wg subnet
| -rw-r--r-- | roles/wireguard/templates/wg0.conf.j2 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/wireguard/templates/wg0.conf.j2 b/roles/wireguard/templates/wg0.conf.j2 index aabd031..647854a 100644 --- a/roles/wireguard/templates/wg0.conf.j2 +++ b/roles/wireguard/templates/wg0.conf.j2 @@ -4,6 +4,8 @@ Address = {{ wireguard_subnet }} ListenPort = {{ wireguard_port }} PrivateKey = {{ wg_priv_key['content'] | b64decode | trim }} +PostUp = ip route add local {{ wireguard_subnet }} dev eth0 + {% for host in hostvars.keys() if not host == inventory_hostname %} # Peer config for: {{ host }} [Peer] |