Skip to content
Snippets Groups Projects
Verified Commit 46a93405 authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

feat: wireguard jinja templ

parent 9f6ef368
Branches
No related tags found
No related merge requests found
[Interface]
Address = {{ interfaces[inventory_hostname]["wg0"].address }}
PrivateKey = {{ keys[inventory_hostname]["private"].key }}
ListenPort = {{ interfaces[inventory_hostname]["wg0"].port }}
[Peer]
{% if inventory_hostname == "H1" %}
PublicKey = {{ keys["H2"]["public"].key }}
AllowedIPs = {{ interfaces["H2"]["wg0"].address }}/32
Endpoint = {{ interfaces["H2"]["eth0"].address }}:{{ interfaces["H2"]["wg0"].port }}
{% else %}
PublicKey = {{ keys["H1"]["public"].key }}
AllowedIPs = {{ interfaces["H1"]["wg0"].address }}/32
Endpoint = {{ interfaces["H1"]["eth0"].address }}:{{ interfaces["H1"]["wg0"].port }}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment