Use Jinja to manage includes

The drawback to the native `%include` Kickstart directive is that it
requires a static, hard-coded, absolute path.  This means that we
cannot, for example, host a copy of the kickstarts from a different
branch for testing, without modifying the URLs of all the included
files.

Switching to using Jinja templates introduces a build step, but the
result is that the artifacts are self-contained.  This way, they can be
deployed anywhere.  I'm not sure where I'll put them, though, and
they'll need a Jenkins job to run the build and publish them.
This commit is contained in:
2025-07-02 10:00:37 -05:00
parent 8933e517fb
commit 1822514b36
12 changed files with 65 additions and 34 deletions

17
fedora.ks.j2 Normal file
View File

@@ -0,0 +1,17 @@
{# vim: set ft=sh.jinja sw=4 ts=4 sts=4 et : -#}
# Create the "standard" disk layout using only the first disk
# Other disks are left alone in case they already contain data, e.g.
# migrated from another system.
bootloader --location mbr
clearpart --all --initlabel --drives vda
reqpart
{% include "fedora-disk-dch.ks" %}
{% include "fedora-common.ks" %}
%packages
qemu-guest-agent
%end
{% include "autoprovision.ks" %}