ansible rework
This commit is contained in:
parent
67414814c0
commit
eecff4345a
47 changed files with 1995 additions and 538 deletions
19
ansible/roles/wireguard/tasks/validate.yaml
Normal file
19
ansible/roles/wireguard/tasks/validate.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
# 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue