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

17 lines
395 B
YAML
Raw Normal View History

2021-06-11 15:01:45 +02:00
---
- name: Install wireguard
hosts: "{{ my_hosts | d([]) }}"
become: true
2021-06-11 15:01:45 +02:00
tasks:
- name: Install wireguard
ansible.builtin.apt:
2021-06-11 15:01:45 +02:00
name: wireguard
update_cache: true
- 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