christianlempa-boilerplates/ansible/installation/inst-wireguard.yaml

15 lines
348 B
YAML
Raw Normal View History

2021-06-11 15:01:45 +02:00
---
2023-05-25 13:48:38 +02:00
- name: install wireguard
hosts: "{{ hosts }}"
2021-06-11 15:01:45 +02:00
become: yes
tasks:
2023-05-25 13:48:38 +02:00
- name: install wireguard
2021-06-11 15:01:45 +02:00
apt:
name: wireguard
update_cache: yes
2023-05-25 13:48:38 +02:00
- name: generate private and public keypair
2021-06-11 15:01:45 +02:00
shell: |
wg genkey | tee privatekey | wg pubkey > publickey
chmod 0400 privatekey
chmod 0400 publickey