This Ansible playbook installs and configures the WireGuard server on CentOS 7, Debian 8, Ubuntu 16.04 and newer releases. Everything is configurable all you need to do is to modify the vars file & the hosts file and you're ready to go.
This playbook tested on Ansible 2.5
ansible-galaxy install mina-alber.wireguard-ansibleansible-playbook -i hosts_inventory wireguard.ymlTo configure the script before using it please check vars/main.yml
wireguard_repo: "https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo"
wireguard_interface_ip: "10.0.0.1/24" # IPADDR/PREFIX
wireguard_port: "51820"- Support Ubuntu
- Grant and revoking users keys
- Test the playbook on Ansible old versions
GPL v3.0
Fork > Do your magic > Test > Pull request