From feaeffdfe520e2dc5b955615556b6c25403b6bde Mon Sep 17 00:00:00 2001 From: modem7 Date: Fri, 23 Oct 2026 13:09:41 +0100 Subject: [PATCH 1/3] Builder: add --init and a default config folder outside the clone verify-clone.sh also reads the config folder, and the builder refuses placeholder ANSIBLE_SSH_PUBKEY and UU_MAIL. --- .../Ubuntu Cloud Template/README.md | 42 +++-- .../Ubuntu Cloud Template/build-templates.sh | 145 +++++++++++++++--- .../Ubuntu Cloud Template/verify-clone.sh | 7 +- 3 files changed, 156 insertions(+), 38 deletions(-) diff --git a/Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md b/Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md index 5d8a5bb..eca5c26 100644 --- a/Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md +++ b/Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md @@ -27,9 +27,23 @@ Scripts for building Ubuntu cloud-init VM templates on a Proxmox host. ## Config for `build-templates.sh` -Two kinds of file, both git-ignored (`*.conf`). Only the `.example` copies +`./build-templates.sh --init` makes a config folder outside the git clone, +so your secrets can't be committed by mistake and a `git pull` never +touches them. The folder is `CONFIG_DIR`, default +`~/.config/ubuntu-templates` (`/root/.config/ubuntu-templates` for root, or +under `XDG_CONFIG_HOME` if set). `--init` copies `shared.conf.example` to +`shared.conf` and each `profiles/*.conf.example` to `profiles/*.conf` in it. +Folders are mode 700, files 600. A file that already exists is kept, never +overwritten, so it is safe to run again. It needs no root, but the builder +runs as root and reads root's folder, so run it as root (or set +`CONFIG_DIR`). + +The old layout still works: `shared.conf` and `profiles/*.conf` next to the +script, where they are git-ignored (`*.conf`). Only the `.example` copies are committed. +Two kinds of file: + - `profiles/