---
- name: Include variables based on the operating system
  include_vars: "{{ ansible_os_family }}.yml"

# @action Ensures VPN is configured
# Installs OpenVPN and WireGuard
# @action Ensures VPN is configured
# Imports OpenVPN Connection files if provided
# @action Ensures VPN is configured
# Installs WireGuard NetworkManager plugin if not found
# @action Ensures VPN is configured
# Configures WireGuard settings
# @action Ensures VPN is configured
# Removes VPN connections if provided
- name: Include tasks based on the operating system
  become: true
  become_method: "{{ 'runas' if ansible_os_family == 'Windows' else 'sudo' }}"
  become_user: "{{ ansible_user if ansible_os_family == 'Windows' else omit }}"
  block:
    - include_tasks: "install-{{ ansible_os_family }}.yml"
