Add agent diagnostic script

This commit is contained in:
sam 2026-03-01 01:23:41 -07:00
parent dc1efc5ae0
commit 5c43952de4

View File

@ -0,0 +1,7 @@
#!/bin/bash
# Diagnose Portainer Agent status on ubuntu-server-02
ansible ubuntu-server-02 -i inventory/hosts.yml \
-m shell \
-a "docker logs portainer_agent 2>&1 | tail -30; echo '=== INSPECT ==='; docker inspect portainer_agent --format '{{.State.Status}} restarts={{.RestartCount}}' 2>&1; echo '=== DOCKER ROOT ==='; docker info 2>/dev/null | grep 'Docker Root Dir'" \
--become 2>&1