Update function: create_template

- Minor display changes
This commit is contained in:
Candifloss 2026-07-23 23:51:42 +05:30
parent 7b9323b143
commit d1fc0d6216

View File

@ -70,18 +70,14 @@ function create_template --description "Create a Proxmox cloud-init template"
end end
# Summary # Summary
echo printf "Create template:\n"
echo "Configuration"
echo
printf " %-12s %s\n" "VMID" "$vmid" printf " %-12s %s\n" "VMID" "$vmid"
printf " %-12s %s\n" "Name" "$name" printf " %-12s %s\n" "Name" "$name"
printf " %-12s %s\n" "Bridge" "$bridge" printf " %-12s %s\n" "Bridge" "$bridge"
printf " %-12s %s\n" "Image" "$image" printf " %-12s %s\n" "Image" "$image"
printf " %-12s %s\n" "Storage" "$storage" printf " %-12s %s\n" "Storage" "$storage"
echo echo
printf " %-12s %s\n" "Machine" "$VM_TEMPLATE_MACHINE" printf " %-12s %s\n" "Machine" "$VM_TEMPLATE_MACHINE"
printf " %-12s %s\n" "CPU" "$VM_TEMPLATE_CPU" printf " %-12s %s\n" "CPU" "$VM_TEMPLATE_CPU"
printf " %-12s %s\n" "Cores" "$VM_TEMPLATE_CORES" printf " %-12s %s\n" "Cores" "$VM_TEMPLATE_CORES"
@ -90,9 +86,10 @@ function create_template --description "Create a Proxmox cloud-init template"
printf " %-12s %s\n" "SCSI HW" "$VM_TEMPLATE_SCSIHW" printf " %-12s %s\n" "SCSI HW" "$VM_TEMPLATE_SCSIHW"
printf " %-12s %s\n" "OS Type" "$VM_TEMPLATE_OSTYPE" printf " %-12s %s\n" "OS Type" "$VM_TEMPLATE_OSTYPE"
echo printf " You can edit these default values in:\n"
printf " $__fish_sysconf_dir/modules/proxmox_host/conf.d/90_overrides.fish\n\n"
read -P "Create template? [y/N] " confirm read -P "Continue? [y/N]: " confirm
if not string match -iqr '^y(es)?$' "$confirm" if not string match -iqr '^y(es)?$' "$confirm"
echo "Aborted." echo "Aborted."