This Ansible role performs a Wireguard installtion.
This role does work with the following minimum versions:
- Ansible: 2.8.4
- Wireguard: v1.0.20210914
- Ubuntu: 16.04
- Debian: 9
- Fedora: 32
---
- hosts: localhost
become: yes
vars:
- wireguard_users:
- username: "client_1"
email: "client_1@example.com"
private_ip: "10.99.0.2"
allow_ips: "10.69.0.0/16"
state: "present"
roles:
- ansible-role-wireguard
The role defines variables in defaults/main.yml
.
- Private IP address of instance. Use to config SNAT with iptables.
- Default:
ansible_default_ipv4.address
- Name of wireguard network interface
- Default:
wg0
- Subnetwork to use in
AllowedIPs
configuration - Default:
10.99.0.0/24
- IP address use to config for server (interface
wg0
) - Default:
10.99.0.1/24
- Wireguard UDP port to listen.
- Default:
51820
- List of user to provision. Follow this structure.
- Example:
wireguard_users:
- username: "client_1"
email: "client_1@example.com"
private_ip: "10.99.0.2"
allow_ips: "10.69.0.0/16"
state: "present"
- Set the mail address that you send from.
- Example: notifications@github.com, info@shopee.vn, ...etc
- Title for mails, usually name of company.
- Key of your AWS SES
- Secret of your AWS SES
BSD-2-Clause