From 91abe71afeb46f42a3891b6274ec2e2c1dc84531 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 26 Apr 2024 17:16:35 +0200 Subject: [PATCH] Actualiser template/template.sh --- template/template.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/template/template.sh b/template/template.sh index ab4554e..f9e9ca2 100644 --- a/template/template.sh +++ b/template/template.sh @@ -9,14 +9,23 @@ ENDCOLOR="\e[0m" template_id=$1 template_name=$2 cloudinit_img=$3 - storage="Datastore" # De base local-lvm | local-btrs | local-zfs | local -# Personnalisation Cloud-init -ci_username="cloudinit" -ci_password="changeme" +# Personnalisation Cloud-init | Intéractif +echo -e "${BOLDGREEN}Veuillez saisir le nom d'utilisateur pour Cloud-init:${ENDCOLOR}" +read -p "> " ci_username + +echo -e "${BOLDGREEN}Veuillez saisir le mot de passe pour Cloud-init:${ENDCOLOR}" +read -s -p "> " ci_password +echo + ci_network="dhcp" +# Personnalisation Cloud-init +# ci_username="cloudinit" +# ci_password="changeme" +# ci_network="dhcp" + # Création de la VM echo -e "\n${BOLDGREEN}Création de la MV${ENDCOLOR}" && sleep 2 qm create $template_id --memory 2048 --core 2 --name $template_name --net0 virtio,bridge=vmbr0 --agent 1