christianlempa-boilerplates/ansible/installation/inst-wireguard.yaml
2023-05-25 13:48:38 +02:00

15 lines
348 B
YAML

---
- name: install wireguard
hosts: "{{ hosts }}"
become: yes
tasks:
- name: install wireguard
apt:
name: wireguard
update_cache: yes
- name: generate private and public keypair
shell: |
wg genkey | tee privatekey | wg pubkey > publickey
chmod 0400 privatekey
chmod 0400 publickey