Skip to content

klever64/wireguard-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wireguard role for ansible

This role deploys a lscr.io/linuxserver/wireguard image and optionally can download peers to specified directory.

Requirements

  • Docker (On target node)
  • community.docker collection

Note

This role is niche to my use case. If you want to setup VPN in production you should probably use more popular roles or write one yourself.

You also can check linuxserver's documentation if you willing to extend / change functionality of this role.

Varables and configuration

Variables for configuring peer downloading

wireguard_download_peers: true
wireguard_download_peers_drectory: ./wg-peers

Variables for configuring peer endpoint

wireguard_server_address: "{{ ansible_host }}"
wireguard_server_port: 51820

Variables for configuring peer interface

wireguard_peer_amount: 1
wireguard_peer_dns: auto
wireguard_peer_subnet: 10.13.13.0
wireguard_peer_allowed_ips: 0.0.0.0/0
wireguard_keepalive_peers: all

Variables for configuring container itself

wireguard_container_puid: 1000
wireguard_container_pgid: 1000
wireguard_container_volume_name: wireguard
wireguard_container_name: wireguard
wireguard_container_restart_policy: unless-stopped

Whether or not to log the configuration in container shell.

wireguard_log_confs: false

License

MIT