summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-23 13:21:31 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-23 13:21:31 +0200
commit220467147463e5ef31c286b570a0954351409aeb (patch)
tree9d5c747c2f941f6a365c9cce1b1617d79ccddfc3
parent222710d2142c0c11fc7e1699eb56a2a25bd3bdeb (diff)
downloadambient-build-vm-220467147463e5ef31c286b570a0954351409aeb.tar.gz
feat(ambient-build-vm): allow user to pick Debian release for image
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rwxr-xr-xambient-build-vm12
1 files changed, 12 insertions, 0 deletions
diff --git a/ambient-build-vm b/ambient-build-vm
index 49a1c3e..3eeec39 100755
--- a/ambient-build-vm
+++ b/ambient-build-vm
@@ -50,6 +50,14 @@ def parse_args():
help="filename for resulting image (required)",
required=True,
)
+
+ p.add_argument(
+ "--debian",
+ action="store",
+ help="install Debian version (codename) instead of the default (%default)",
+ default="bookworm",
+ )
+
return p.parse_args()
@@ -73,6 +81,10 @@ def prepare_build_files(tmp, args):
vmdb = load_yaml(join(args, BASE_VMDB))
+ for step in vmdb["steps"]:
+ if "debootstrap" in step:
+ step["debootstrap"] = args.debian
+
for playbook in args.playbook:
vmdb["steps"].append(
{