Add agent diagnostic script
This commit is contained in:
parent
dc1efc5ae0
commit
5c43952de4
7
scripts/diagnose_agent.sh
Normal file
7
scripts/diagnose_agent.sh
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user