Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Bash/Proxmox Scripts/Ubuntu Cloud Template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# The example (profile.conf.example) is not ignored.
*.conf

# Output of build-templates.sh (normally /root/template-build, in case OUT_DIR is set inside the repo).
# Output of build-templates.sh (default: template-build next to the script).
template-build/
5 changes: 5 additions & 0 deletions Bash/Proxmox Scripts/Ubuntu Cloud Template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ are committed.
`CLOUD_PASSWORD`) used by every template unless its profile sets them.
It holds secrets.

`OUT_DIR` is the generated output (profiles and payloads, root-only). It
defaults to `template-build/` next to the script, which is git-ignored. Set
`OUT_DIR` in `shared.conf` or the environment to put it elsewhere. Before
this default it was `/root/template-build`.

Each generated `OUT_DIR/<template>.conf` is, in order:

1. The host defaults from `shared.conf` (`CI_SSH_KEY` becomes `SSH_KEY`).
Expand Down
4 changes: 2 additions & 2 deletions Bash/Proxmox Scripts/Ubuntu Cloud Template/build-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PUBLIC_SCRIPT_URLS=(
"https://raw.githubusercontent.com/modem7/public_scripts/master/Bash/Proxmox%20Scripts/create-ubuntu-cloud-template.sh"
)
ZSWAP_SCRIPT_URL="https://raw.githubusercontent.com/modem7/public_scripts/master/Bash/Server%20scripts/zram-to-zswap.sh"
OUT_DIR="${OUT_DIR:-/root/template-build}" # generated profiles + payloads (root-only)
OUT_DIR="${OUT_DIR:-$SCRIPT_DIR/template-build}" # generated profiles + payloads (root-only)

# --- Host defaults: written into every profile, which can override them ---
DISTRO_VER="resolute"
Expand Down Expand Up @@ -199,7 +199,7 @@ ENVIRONMENT
PUBLIC_SCRIPT Local copy of create-ubuntu-cloud-template.sh.
Default: /root/create-ubuntu-cloud-template.sh
OUT_DIR Where generated files go.
Default: /root/template-build
Default: template-build next to this script
UPDATE_PUBLIC_SCRIPT no = keep the local PUBLIC_SCRIPT. Default: yes

OUTPUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# --- Paths ---
# PUBLIC_SCRIPT="/root/create-ubuntu-cloud-template.sh" # downloaded if missing
# OUT_DIR="/root/template-build" # generated files (root-only)
# OUT_DIR="$SCRIPT_DIR/template-build" # generated files (root-only); default

# --- Host defaults ---
# Written into every profile first, so a profile can override any of them.
Expand Down
Loading