- name: Generate WireGuard Client Configuration hosts: localhost gather_facts: true 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]['key'] }}"