debug
This commit is contained in:
parent
9d37b141a6
commit
74cfa273fc
@ -24,6 +24,20 @@ cd "$WORKDIR"
|
|||||||
echo ">> Clonage du rôle depuis le dépôt Git : $ANSIBLE_ROLE_GIT"
|
echo ">> Clonage du rôle depuis le dépôt Git : $ANSIBLE_ROLE_GIT"
|
||||||
git clone "$ANSIBLE_ROLE_GIT" "$ROLE_NAME"
|
git clone "$ANSIBLE_ROLE_GIT" "$ROLE_NAME"
|
||||||
|
|
||||||
|
|
||||||
|
# debug
|
||||||
|
echo ">> DEBUG: Test de résolution DNS..."
|
||||||
|
host "$GIT_HOST" || echo "❌ DNS lookup failed for $GIT_HOST"
|
||||||
|
|
||||||
|
echo ">> DEBUG: Test de connexion HTTPS..."
|
||||||
|
curl -Iv "https://$GIT_HOST" 2>&1 | grep -i "connected\|failed" || echo "❌ curl connection test failed for https://$GIT_HOST"
|
||||||
|
|
||||||
|
echo ">> Clonage du rôle depuis le dépôt Git : $ANSIBLE_ROLE_GIT"
|
||||||
|
if ! git clone "$ANSIBLE_ROLE_GIT" "$ROLE_NAME"; then
|
||||||
|
echo "❌ Échec du clonage Git. Vérifiez l'accès réseau, les permissions SSH ou le certificat SSL."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Création de l’inventaire ---
|
# --- Création de l’inventaire ---
|
||||||
mkdir -p inventory/group_vars inventory/host_vars
|
mkdir -p inventory/group_vars inventory/host_vars
|
||||||
|
|
||||||
@ -80,7 +94,7 @@ EOF
|
|||||||
|
|
||||||
# --- Exécution ---
|
# --- Exécution ---
|
||||||
echo ">> Lancement du playbook avec le rôle $ROLE_NAME sur $HOSTNAME"
|
echo ">> Lancement du playbook avec le rôle $ROLE_NAME sur $HOSTNAME"
|
||||||
ansible-playbook -i inventory/hosts.ini playbook.yml
|
ansible-playbook -i inventory/hosts.ini playbook.yml -vvv
|
||||||
|
|
||||||
echo ">> Exécution terminée avec succès."
|
echo ">> Exécution terminée avec succès."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user