#!/bin/sh # Sonde de `make etat` (scripts/etat.py), envoyee par `ansible -m script`. Lit, n'ecrit rien. # DEPOTnomtete du runnertete de sa forge — sur un runner (/opt/setops) # REDIStable, puis cle/valeur une par ligne — sur la machine d'Icinga if [ -d /opt/setops ]; then for d in /opt/setops/*/; do [ -d "$d.git" ] || continue l=$(runuser -u setops -- git -C "$d" rev-parse --short=7 HEAD 2>/dev/null) f=$(timeout 20 runuser -u setops -- git -C "$d" ls-remote origin HEAD 2>/dev/null | cut -c1-7) printf 'DEPOT\t%s\t%s\t%s\n' "$(basename "$d")" "$l" "${f:-?}" done fi if command -v icingadb-redis-cli >/dev/null 2>&1; then for k in host service host:state service:state; do printf 'REDIS\t%s\n' "$k" icingadb-redis-cli -p 6380 --no-auth-warning --raw HGETALL "icinga:$k" done fi exit 0