0
0

Added installation step

This commit is contained in:
Opnxng 2023-11-11 04:31:12 +08:00
parent c733030361
commit 100a06be9b
2 changed files with 19 additions and 15 deletions

View File

@ -22,31 +22,22 @@ The role uses the `wg-quick` control which is also exposed via a Systemd service
```
all:
hosts:
your-host-1:
pipelining: true
ansible_ssh_user: root
host1:
ansible_host: 172.0.0.1
ansible_ssh_port: 22
wireguard_ip: 10.1.0.1
your-host-2:
pipelining: true
ansible_ssh_user: root
host2:
ansible_host: 172.0.0.2
ansible_ssh_port: 22
wireguard_ip: 10.2.0.1
your-host-3:
pipelining: true
ansible_ssh_user: root
host3:
ansible_host: 172.0.0.3
ansible_ssh_port: 22
wireguard_ip: 10.3.0.1
vars:
pipelining: true
ansible_ssh_port: 22
ansible_ssh_user: root
ansible_become_method: su
wireguard_mask_bits: 24
wireguard_port: 51871

View File

@ -1,3 +1,16 @@
- name: Get kernel release
command: 'uname -r'
register: uname_r_result
no_log: true
- name: Install packages
apt:
name:
- wireguard
- linux-headers-{{ uname_r_result.stdout }}
state: latest
install_recommends: false
- name: Generate Wireguard keypair
shell: wg genkey | tee /etc/wireguard/privatekey | wg pubkey | tee /etc/wireguard/publickey
args: