kedge/ansible/playbooks/mesh-health.yml
Tyler King 6058e62348 Initial commit: Kedge network automation platform
Go-based network automation with YANG models, gRPC, Ansible,
Terraform, and Kubernetes integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:09:30 -05:00

30 lines
908 B
YAML

---
# Verify overlay mesh connectivity between all clusters.
- name: Mesh health check
hosts: all
become: true
tasks:
- name: Check WireGuard interface
ansible.builtin.command:
cmd: wg show wg0
register: wg_status
changed_when: false
- name: Display WireGuard status
ansible.builtin.debug:
var: wg_status.stdout_lines
- name: Ping overlay peers
ansible.builtin.command:
cmd: "ping -c 3 -W 2 {{ item }}"
loop: "{{ wg_peers | default([]) | map(attribute='allowed_ips') | flatten | map('regex_replace', '/.*', '') | list }}"
register: ping_results
changed_when: false
failed_when: false
- name: Check Kedge DaemonSet health
ansible.builtin.uri:
url: "http://localhost:{{ kedge_metrics_port }}/healthz"
return_content: true
register: health
failed_when: health.status != 200