2021-06-11 15:01:45 +02:00
|
|
|
---
|
2024-03-03 16:54:47 +01:00
|
|
|
- name: Install wireguard
|
2024-02-23 12:19:48 +01:00
|
|
|
hosts: "{{ my_hosts | d([]) }}"
|
2024-03-03 16:16:22 +01:00
|
|
|
become: true
|
2024-03-03 16:34:29 +01:00
|
|
|
|
2021-06-11 15:01:45 +02:00
|
|
|
tasks:
|
2024-03-03 16:54:47 +01:00
|
|
|
- name: Install wireguard
|
2024-02-24 11:56:25 +01:00
|
|
|
ansible.builtin.apt:
|
2021-06-11 15:01:45 +02:00
|
|
|
name: wireguard
|
2024-03-03 16:16:22 +01:00
|
|
|
update_cache: true
|
2024-03-03 16:34:29 +01:00
|
|
|
|
2024-03-03 16:54:47 +01:00
|
|
|
- name: Generate private and public keypair
|
2024-02-24 11:56:25 +01:00
|
|
|
ansible.builtin.shell: |
|
2021-06-11 15:01:45 +02:00
|
|
|
wg genkey | tee privatekey | wg pubkey > publickey
|
|
|
|
chmod 0400 privatekey
|
|
|
|
chmod 0400 publickey
|