Files
ansible_uni_deploy/roles/wireguard_server/tasks/generate_client.yml

10 lines
255 B
YAML

---
- name: Generate WireGuard client config
template:
src: wireguardclient.conf
dest: "{{ lookup('env', 'HOME') }}/{{ user }}.conf"
owner: "{{ ansible_user_id }}"
group: "{{ ansible_user_id }}"
mode: '0644'
delegate_to: localhost