Ansible role to manage Wireguard tunnels
Go to file
OpenDev Sysadmins 362cefab68 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:52:15 +00:00
handlers add restart handlers 2019-04-04 23:23:10 -04:00
meta Add Debian support 2019-04-10 23:23:09 -04:00
tasks Add Debian support 2019-04-10 23:23:09 -04:00
templates make endpoint optional 2019-04-04 23:11:35 -04:00
tests OpenDev Migration Patch 2019-04-19 19:52:15 +00:00
vars Add Debian support 2019-04-10 23:23:09 -04:00
zuul.d Add Debian support 2019-04-10 23:23:09 -04:00
.gitignore inital commit 2019-04-04 22:16:39 -04:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:15 +00:00
README.md fix readme 2019-04-04 22:39:17 -04:00

README.md

WireGuard

Dependencies

This role does not take care of generating keys for you. You should be able to take care of that yourself.

RHEL/CentOS

This role depends on the fact that you have the EPEL repositories installed on your machine. It does not manage that for you.

Usage

This example below should be pretty self-explanitory.

---
- hosts: vpn1.internal
  roles:
    - wireguard
  vars:
    wireguard_links:
      - name: wg0
        address: 10.0.0.1
        port: 51820
        private_key: eCpvWOe8zI0HCj/KjK3TZP71kd+glDxvDo5JaQhw3mw=
        post_up: iptables ...
        post_down: iptables ...
        peers:
          - public_key: UB9Lhk0JgwAPFD8F3k3Dq9iS7r/jLD+oYMX98T+fmGw=
            endpoint: vpn2.internal:51820
            allowed_ips: 10.0.0.2

- hosts: vpn2.internal
  roles:
      - wireguard
  vars:
    wireguard_links:
      - name: wg0
        address: 10.0.0.2
        port: 51820
        private_key: aIPcdRd6ncwRa+DJLaiq0Jmbvx1FjtLnWE2EApgcr2E=
        post_up: iptables ...
        post_down: iptables ...
        peers:
          - public_key: E/MU5hNb1mQ55ww0H0luxigNTXNNo/x49MRm5AcHLSI=
            endpoint: vpn1.internal:51820
            allowed_ips: 10.0.0.1