mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-23 13:11:04 +01:00
27 lines
670 B
YAML
27 lines
670 B
YAML
- name: install wireguard for Arch
|
|
pacman:
|
|
name: wireguard-tools
|
|
state: present
|
|
when: ansible_os_family == "Archlinux"
|
|
|
|
- name: install wireguard for Ubuntu
|
|
apt:
|
|
name: wireguard
|
|
state: present
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: create wireguard-ip.conf
|
|
copy:
|
|
src: "wireguard-ip.conf"
|
|
dest: /etc/sysctl.d/wireguard-ip.conf
|
|
owner: root
|
|
group: root
|
|
notify: reload sysctl configuration
|
|
|
|
- name: create /etc/wireguard/wg0.conf
|
|
copy:
|
|
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/etc/wireguard/wg0.conf"
|
|
dest: /etc/wireguard/wg0.conf
|
|
owner: root
|
|
group: root
|
|
notify: restart wireguard |