feat : preparation de postgresql (WIP)

This commit is contained in:
2026-03-17 16:03:19 +01:00
parent 6c61f6e543
commit 5b128bc81a

View File

@@ -312,8 +312,13 @@ chmod 644 $(shell_quote "$(dirname "$TARGET_SSH_KEY_VALUE")/known_hosts") || tru
"
log "Installation du socle minimal sur la cible"
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_SETUP_CMD" \
|| fail "échec de préparation système distante"
if [[ "$JSON_ONLY" == "yes" ]]; then
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_SETUP_CMD" >/dev/null \
|| fail "échec de préparation système distante"
else
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_SETUP_CMD" \
|| fail "échec de préparation système distante"
fi
TMP_ENV_FILE="$(mktemp)"
@@ -510,8 +515,13 @@ done
"
log "Clone / mise à jour du dépôt distant"
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_REPO_CMD" \
|| fail "échec de synchronisation du dépôt sur la cible"
if [[ "$JSON_ONLY" == "yes" ]]; then
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_REPO_CMD" >/dev/null \
|| fail "échec de synchronisation du dépôt sur la cible"
else
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_REPO_CMD" \
|| fail "échec de synchronisation du dépôt sur la cible"
fi
REMOTE_VALIDATE_SUDO_ROOT_CMD="
set -euo pipefail
@@ -546,8 +556,13 @@ ENV_FILE=$(shell_quote "$TARGET_ENV_FILE_PATH")
"
log "Préparation PostgreSQL via check-postgresql.sh"
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_RUN_CHECK_PG_CMD" \
|| fail "échec de préparation PostgreSQL pendant le bootstrap"
if [[ "$JSON_ONLY" == "yes" ]]; then
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_RUN_CHECK_PG_CMD" >/dev/null \
|| fail "échec de préparation PostgreSQL pendant le bootstrap"
else
ssh "${SSH_OPTS[@]}" "$REMOTE" "$REMOTE_RUN_CHECK_PG_CMD" \
|| fail "échec de préparation PostgreSQL pendant le bootstrap"
fi
REMOTE_VALIDATE_SUDO_POSTGRES_CMD="
set -euo pipefail