diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-05-03 18:10:47 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-05-03 18:10:47 +0300 |
commit | 4f453499d56fb380cded1b5c3d9cdb27a1556883 (patch) | |
tree | ea5a2c662c0f68a66391b0a2765424ce8d529d1b /v-i | |
parent | 7604b31b2bacf44f29d934c6972964d08b9804be (diff) | |
download | v-i-4f453499d56fb380cded1b5c3d9cdb27a1556883.tar.gz |
feat: allow a spec file to specify Debian release
Sponsored-by: author
Diffstat (limited to 'v-i')
-rwxr-xr-x | v-i | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -208,9 +208,9 @@ def cache_rootfs(tag): } -def debootstrap(tag): +def debootstrap(debian_release, tag): return { - "debootstrap": "bullseye", + "debootstrap": debian_release, "mirror": "http://deb.debian.org/debian", "target": tag, "unless": "rootfs_unpacked", @@ -304,7 +304,7 @@ def vmdb_spec(system, ansible_vars): # format the root file system. This gets a fair bit of use, so # ext4 seems like a safe choice. If you wanted another file # system, sorry. - mkfs("root", "ext4"), + mkfs("root", "btrfs"), # Mount the root file system. mount("root"), # Mount /boot on top of the root file system. @@ -319,7 +319,7 @@ def vmdb_spec(system, ansible_vars): steps.extend( [ lvcreate("vg0", lv["name"], lv["size"]), - mkfs(lv["name"], "ext4"), + mkfs(lv["name"], "btrfs"), mount(lv["name"], dirname=lv["mounted"], mount_on="root"), ] ) @@ -332,7 +332,7 @@ def vmdb_spec(system, ansible_vars): # have to remember to manually remove the cache file. v-i or # vmdb2 won't do that automatically for you. unpack_rootfs("root"), - debootstrap("root"), + debootstrap(system.debian_release, "root"), apt( "root", [ @@ -393,6 +393,7 @@ class SystemSpec: "ansible_vars": {}, "ansible_vars_files": [], "luks": "", + "debian_release": "bullseye", } with open(filename) as f: obj = yaml.safe_load(f) |