Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example: allow user modifications via
otk.define
This commit adds support for user modifications. The idea behind modifications is that those are variables that users want to change to customize the imagess. This appears uses the existing otk.defines mechanism and adds a convention around the naming for modifications. We will use the customizations from blueprints and map them to modifcations. A simple example would be: ```yaml otk.define: user: modifications: locale: nl_NL.UTF-8 ``` In our otk files we will have defaults for all supported modifications and then join the defaults with the user define modifcations. ```yaml otk.define: default: modifications: locale: en_US.UTF-8 modifications: otk.op.join: values: - ${default.modifications} - ${user.modifications} ``` This allows us to follow the idea from the images PR#797 (osbuild/images#797): ```yaml otk.define: user: modifications: hostname: "hal-9000" kernel_append: "debug" keyboard: "uk" otk.include: `/otkroot/fedora-40/x86_64/qcow2.yaml` ``` and because the otk.op.join will merge two tree this should work. We could also (later) provide a convinience helper like: ``` $ otk compile --preload/--include "my-customizatins.yaml" centos-9-x86_64-ami.yaml ``` which would just preload/include (terms stawman) the customizations and then proceed processing the centos-9-x86_64-ami.yaml file. To see what modifications are supported by a given image we would just list (via otk) what "modifications" vars are being used for a given image type. Note that this commit cheats by pre-defining an empty "user.modifications" var. This avoids having to deal with the issue of undefined variables and conditionals.
- Loading branch information