mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
initial cleanup server-manager
This commit is contained in:
10
roles/native-wireguard/README.md
Normal file
10
roles/native-wireguard/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Role Native Wireguard
|
||||
Manages wireguard natively on host. More information are available in the [Arch wiki](https://wiki.archlinux.org/index.php/WireGuard#Manual_WireGuard_setup).
|
||||
|
||||
## Create Client Key
|
||||
``bash
|
||||
wg genkey | tee peer_A.key | wg pubkey > peer_A.pub
|
||||
``
|
||||
|
||||
# chown root:systemd-network /etc/systemd/network/99-*.netdev
|
||||
# chmod 0640 /etc/systemd/network/99-*.netdev
|
2
roles/native-wireguard/handlers/main.yml
Normal file
2
roles/native-wireguard/handlers/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
- name: restart wireguard
|
||||
service: name=wg-quick@wg0.service state=restarted enabled=yes
|
6
roles/native-wireguard/tasks/main.yml
Normal file
6
roles/native-wireguard/tasks/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: install wireguard
|
||||
pacman: name=wireguard-tools state=present
|
||||
|
||||
- name: create /etc/wireguard/wg0.conf
|
||||
template: src={{ inventory_hostname }}.wg0.conf dest=/etc/wireguard/wg0.conf
|
||||
notify: restart wireguard
|
Reference in New Issue
Block a user