19 lines
632 B
YAML
19 lines
632 B
YAML
---
|
|
# Variable validation for wireguard role
|
|
|
|
- name: Validate WireGuard required variables
|
|
ansible.builtin.assert:
|
|
that:
|
|
- wireguard_network is defined
|
|
- wireguard_network | length > 0
|
|
- wireguard_port is defined
|
|
- wireguard_port | int > 0
|
|
- wireguard_port | int < 65536
|
|
- wireguard_interface is defined
|
|
- wireguard_interface | length > 0
|
|
fail_msg: |
|
|
WireGuard role requires:
|
|
- wireguard_network (CIDR notation, e.g., 10.20.0.0/24)
|
|
- wireguard_port (1-65535)
|
|
- wireguard_interface (e.g., wg0)
|
|
success_msg: "WireGuard variables validated successfully"
|