Refactor Debian 13 Trixie Packer templates for LUKS support
- Removed obsolete variable files: variables-common.pkr.hcl and variables.pkr.hcl. - Updated debian-trixie.pkr.hcl to include local values for LUKS configuration. - Modified boot command to include LUKS arguments based on the enable_luks variable. - Enhanced initial-setup.sh to support LUKS detection and resizing. - Replaced preseed.cfg with preseed.cfg.pkrtpl for dynamic LUKS configuration. - Added enable_luks variable to control LUKS encryption during image build. - Introduced luks.pkrvars.hcl for LUKS-specific variable settings. - Updated mise.toml to support new variable file argument for Packer builds.
This commit is contained in:
parent
e57f2d977b
commit
eded7180dc
20 changed files with 281 additions and 2445 deletions
11
mise.toml
11
mise.toml
|
|
@ -17,14 +17,15 @@ run = "packer fmt --recursive ${usage_dir?}"
|
|||
[tasks.build]
|
||||
usage = '''
|
||||
arg "<dir>" help="Directory containing the Packer template to build e.g. debian/13-trixie"
|
||||
flag "--var-file <path>" help="HCL var-file to pass to Packer"
|
||||
flag "-i --install-finished-inform-port <port>" help="Server port to inform when installation is finished" hide=#true
|
||||
'''
|
||||
run = '''
|
||||
mise run lint ${usage_dir?}
|
||||
[[ -z "${usage_install_finished_inform_port}" ]] && packer build ${usage_dir?} || true
|
||||
[[ -n "${usage_install_finished_inform_port}" ]] && packer build \
|
||||
-var "install_finished_inform_port=${usage_install_finished_inform_port?}" \
|
||||
${usage_dir?} || true
|
||||
build_args=()
|
||||
[[ -n "${usage_var_file}" ]] && build_args+=("-var-file=${usage_var_file?}")
|
||||
[[ -n "${usage_install_finished_inform_port}" ]] && build_args+=("-var" "install_finished_inform_port=${usage_install_finished_inform_port?}")
|
||||
packer build "${build_args[@]}" ${usage_dir?} || true
|
||||
'''
|
||||
|
||||
[tasks.build-luks]
|
||||
|
|
@ -33,7 +34,7 @@ arg "<dir>" help="Directory containing the Packer template to build e.g. debian/
|
|||
flag "--luks-wait-seconds <seconds>" help="Seconds to wait for the LUKS password prompt after installation before sending the password" default="45"
|
||||
'''
|
||||
run = '''
|
||||
_scripts/unlock-luks-after-install.py -t ${usage_dir?} --luks-wait-seconds ${usage_luks_wait_seconds?}
|
||||
_scripts/unlock-luks-after-install.py -t ${usage_dir?} --var-file ${usage_dir?}/variants/luks.pkrvars.hcl --luks-wait-seconds ${usage_luks_wait_seconds?}
|
||||
'''
|
||||
|
||||
[tasks.init]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue