2023-04-11 21:21:06 +02:00
|
|
|
- name: install wireguard
|
|
|
|
pacman:
|
|
|
|
name: wireguard-tools
|
|
|
|
state: present
|
|
|
|
|
2023-04-18 13:56:43 +02:00
|
|
|
- name: create set-mtu.service
|
|
|
|
copy:
|
|
|
|
src: set-mtu.service
|
|
|
|
dest: /etc/systemd/system/set-mtu.service
|
|
|
|
notify: restart set-mtu.service
|
2023-04-11 21:21:06 +02:00
|
|
|
|
2023-04-18 13:56:43 +02:00
|
|
|
- name: create set-mtu.sh
|
|
|
|
template:
|
|
|
|
src: set-mtu.sh.j2
|
|
|
|
dest: /usr/local/bin/set-mtu.sh
|
|
|
|
notify: restart set-mtu.service
|
|
|
|
|
|
|
|
- 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
|
2023-04-11 21:21:06 +02:00
|
|
|
|
|
|
|
- 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
|