initial pfannkuchen
This commit is contained in:
parent
b6dafc7a73
commit
4d305fa19f
99 changed files with 3575 additions and 321 deletions
32
roles/wireguard/tasks/main.yml
Normal file
32
roles/wireguard/tasks/main.yml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
- name: WireGuard und resolvconf installieren
|
||||
apt:
|
||||
name:
|
||||
- wireguard
|
||||
- resolvconf
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: WireGuard Config deployen
|
||||
copy:
|
||||
dest: /etc/wireguard/wg0.conf
|
||||
content: |
|
||||
[Interface]
|
||||
PrivateKey = {{ wireguard_private_key }}
|
||||
Address = {{ wireguard_address }}
|
||||
DNS = 8.8.8.8
|
||||
MTU = {{ wireguard_mtu }}
|
||||
|
||||
[Peer]
|
||||
PublicKey = {{ wireguard_vps_pubkey }}
|
||||
Endpoint = {{ wireguard_endpoint }}
|
||||
AllowedIPs = {{ wireguard_allowed_ips }}
|
||||
PersistentKeepalive = {{ wireguard_persistent_keepalive }}
|
||||
mode: "0600"
|
||||
notify: restart wireguard
|
||||
|
||||
- name: WireGuard aktivieren und starten
|
||||
systemd:
|
||||
name: wg-quick@wg0
|
||||
enabled: true
|
||||
state: started
|
||||
Loading…
Add table
Add a link
Reference in a new issue