Files
ansible_uni_deploy/playbooks/services/wireguard-client-gen.yml

21 lines
579 B
YAML

- name: Generate WireGuard Client Configuration
hosts: localhost
gather_facts: false
vars_files:
- ../../group_vars/vault.yml
- ../../group_vars/all.yml
vars:
user: matej
tasks:
- name: Include wireguard_server role to generate client config
ansible.builtin.include_role:
name: wireguard_server
tasks_from: generate_client
vars:
# Pass the required variables to the role
IP: "{{ lookup('vars', 'wireguard-client')[user]['ip'] }}"
priv: "{{ lookup('vars', 'wireguard-client-vault')[user]['pub'] }}"