init
This commit is contained in:
commit
883f31932e
169 changed files with 5676 additions and 0 deletions
21
ansible/roles/wireguard/tasks/deploy-wireguard.yml
Normal file
21
ansible/roles/wireguard/tasks/deploy-wireguard.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
-
|
||||
name: Read WireGuard private key
|
||||
slurp:
|
||||
src: /etc/wireguard/private.key
|
||||
register: wg_private_key_file
|
||||
|
||||
-
|
||||
name: Deploy WireGuard configuration
|
||||
template:
|
||||
src: wg.conf.j2
|
||||
dest: "/etc/wireguard/{{ wg_interface }}.conf"
|
||||
mode: "0600"
|
||||
notify: restart wireguard
|
||||
|
||||
-
|
||||
name: Enable and start WireGuard
|
||||
systemd:
|
||||
name: "wg-quick@{{ wg_interface }}"
|
||||
enabled: yes
|
||||
state: started
|
||||
Loading…
Add table
Add a link
Reference in a new issue