Ansible Scalability, Deploy Configuration Files to Multiple Servers at Scale
Provision AWS EC2 servers and deploy configuration files across all of them at scale with Ansible.
Audits WireGuard gateway interface peer states via telemetry, detects handshake staleness and dropped tunnels, and alerts engineers via Slack.
Audits WireGuard secure tunnel gateway peer connectivity via wireguard telemetry exporters or management APIs, identifying cryptographically stale handshakes and dropped site-to-site VPN tunnels before cross-datacenter connectivity degrades.
flowchart TD
A[periodic_wireguard_audit Schedule Trigger] --> B[scan_wireguard_peers Python Script]
B --> C[check_stale_wireguard_peers Flowable If]
C -- Threshold Breached --> D[notify_slack_network_alert Webhook]
C -- Metrics Nominal --> E[log_nominal_wireguard_state Log]
D --> E
E --> F[export_wireguard_manifest Return]
periodic_wireguard_audit): Drives scheduled recurring surveillance cycles without human intervention.scan_wireguard_peers): Queries target APIs and structures diagnostic indicators via Kestra outputs.check_stale_wireguard_peers): Evaluates operational safety boundaries using deterministic boolean branching.notify_slack_network_alert): Dispatches rich, actionable incident messages directly to team channels.export_wireguard_manifest): Emits structured compliance payloads for SIEM and analytics records.| Name | Type | Default | Description |
|---|---|---|---|
wireguard_interface |
STRING |
wg0 |
Identifier of the target WireGuard network tunnel interface to inspect. |
max_handshake_age_seconds |
INT |
300 |
Maximum tolerated elapsed seconds since last successful cryptographic handshake before a peer is flagged as stale. |
stale_peer_threshold |
INT |
1 |
Threshold count of stale WireGuard peers required to trigger an automated incident notification. |
metrics_endpoint_url |
STRING |
http://vpn-gateway.internal:9586/metrics |
HTTP endpoint URL exposing Prometheus or JSON wireguard telemetry from the host gateway. |
alert_on_stale |
BOOL |
True |
Toggle whether Slack webhook notifications are dispatched when stale peer thresholds are breached. |
{{ outputs.scan_wireguard_peers.vars.total_peer_count }}: Total number of WireGuard peers configured on the audited interface.{{ outputs.scan_wireguard_peers.vars.stale_peer_count }}: Count of peers exhibiting handshake staleness exceeding configured thresholds.{{ outputs.scan_wireguard_peers.vars.stale_peers }}: Truncated public keys and elapsed handshake durations of identified stale peer endpoints.{{ outputs.scan_wireguard_peers.vars.is_alerting }}: Boolean flag indicating whether stale peer count breached configured incident criteria.SLACK_WEBHOOK_URL: Vault secret required for authenticated API execution and notifications.company.cloud namespace.