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

15 lines
380 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
ansible.builtin.apt:
2021-06-11 15:01:45 +02:00
name: wireguard
update_cache: yes
2023-05-25 13:48:38 +02:00
- name: generate private and public keypair
ansible.builtin.shell: |
2021-06-11 15:01:45 +02:00
wg genkey | tee privatekey | wg pubkey > publickey
chmod 0400 privatekey
chmod 0400 publickey