Skip to content

Products from YAML File

Ladislav Slezák edited this page Oct 21, 2022 · 5 revisions

Registering a Different Product

The product to register is normally read from the current system. However in special cases it is possible to read the product to register from an YAML file.

This allows to register a different product than is installed.

Notes

  • Using an YAML file is currently only supported in the WSL first boot workflow, see more details in the firstboot documentation
  • This requires yast2-registration >= 4.4.23 or >= 4.5.6.

YAML Specification

Location

By default the YAML file location is /etc/YaST2/products.yaml.

YAML Schema

The YAML is expected to contain an array of products (hashes), each product defines these keys:

  • display_name (String) - displayed product name, a human readable name
  • name (String) : unique product ID as expected by the registration server
  • version (String) : version of the product
    (if the product version contains a dot (.) separator then wrap the value in double quotes to avoid parsing it as a Float type)
  • register_target (String) : product registration family
    (defined as the product-register-target() RPM Provides dependency of the product *-release.rpm package)
  • default (Boolean, optional) : the default pre-selected product, only one product should be specified as the default,
    if no product is specified as the default then the first product in the list is used as the default
  • arch (String, optional) : product architecture, if not specified the current system architecture is used

Notes

  • The products are displayed in the order as defined in the YAML file.
  • The $arch text anywhere in the value string is replaced by the current machine architecture

Example File

- display_name: "SUSE Linux Enterprise Server 15 SP4"
  name: "SLES"
  register_target: "sle-15-$arch"
  version: "15.4"
  default: true
- display_name: "SUSE Linux Enterprise Desktop 15 SP4"
  name: "SLED"
  register_target: "sle-15-$arch"
  version: "15.4"

Links