VPN setting

This commit is contained in:
git
2024-04-04 08:46:10 +02:00
parent 55167e20fc
commit b8369d0b28
17 changed files with 308 additions and 81 deletions

23
wireguad-client-gen.yml Normal file
View File

@@ -0,0 +1,23 @@
- name: wireguard-client-gen
hosts: localhost
connection: local
vars_files:
- vault.yml
- zeus-vars.yml
vars:
user: ntb
IP_name: 'wireguard_{{ user }}_ip'
IP: "{{ lookup('vars', IP_name) }}"
priv_name: 'wireguard_{{ user }}_key'
priv: "{{ lookup('vars', priv_name) }}"
tasks:
- name: Copy from template
template:
src: roles/wireguard-server/templates/wireguardclient.conf
dest: ~/{{ user }}.conf
owner: "{{ ansible_user_id }}"
group: "{{ ansible_user_id }}"
mode: '0644'