15 lines
365 B
YAML
15 lines
365 B
YAML
---
|
|
- name: Validate gateway configuration
|
|
debug:
|
|
msg: "Validating {{ inventory_hostname }}"
|
|
|
|
- name: Check WireGuard peers connectivity
|
|
shell: "ping -c 3 -W 2 {{ peer.wg_ip }}"
|
|
loop: "{{ gateway_config.peers }}"
|
|
loop_control:
|
|
loop_var: peer
|
|
register: ping_results
|
|
failed_when: false
|
|
changed_when: false
|
|
when: gateway_config.type == 'linux'
|