From a970a20eccd36708fb576469e34bc6fa08b7c005 Mon Sep 17 00:00:00 2001 From: faten Date: Mon, 21 Apr 2025 16:11:19 +0000 Subject: [PATCH] install dependance --- create_openstack_project.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/create_openstack_project.sh b/create_openstack_project.sh index 8bddfd6..c903b07 100644 --- a/create_openstack_project.sh +++ b/create_openstack_project.sh @@ -5,6 +5,20 @@ #set -u # Fait échouer le pipeline si une commande échoue set -o pipefail + + +# --- Installation des dépendances --- +echo "--- Installation des dépendances (OpenStack Client, jq) ---" +if command -v sudo &> /dev/null && command -v apt-get &> /dev/null; then + echo "Attempting installation using apt-get..." + sudo apt-get update -y || echo "WARN: apt-get update failed, continuing..." + sudo apt-get install -y python3-openstackclient jq || { echo "ERREUR: Failed to install packages."; exit 1; } + echo "Installation attempt finished." +else + echo "WARN: sudo or apt-get not found. Assuming dependencies are pre-installed." +fi + + echo ">>>>>> DEBUG: Liste des variables d'environnement reçues par le script <<<<<<" env | sort echo ">>>>>>>>>>>>>>>>>>>> FIN DEBUG <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"