Skip to content

Preseed Action

The preseed action defines the contents of the <profile>.preseed file. This file will contain the preconfiguration for the Debian installer. The preseed action takes in a jinja template of the preseed file, in which chosen configuration parameters are replaced with jinja variables. Finally, it replaces the parameters with the provided substition variables.

Tip

Check out the Debian documentation on the contents of the preconfiguration file to learn more about the preseed file.

Usage

Click on the to learn more about the action's options.

Preseed Action
{% set username=username or "user" -%}
{% set user_fullname=user_fullname or "User" -%}

actions:
  - action: preseed
    description: Basic preseed file for minimum Debian system with EFI boot #(1)!
    preconf: preseeds/base-preseed.txt # (2)!
    variables: # (3)! 
      user_fullname: {{user_fullname}}
      username: {{username}}
  1. [Optional] Description, for documentation purposes
  2. [Required] Relative link to the preseed template file
  3. [Optional] Substition variables

Implementation

PreseedAction

Bases: Action

Preseed action

Source code in simple_cdd_yaml/actions.py
class PreseedAction(Action):
    """ Preseed action """
    def perform_action(self, props):
        return self._read_substitute(props['preconf'],
                                     props.get('variables', {}))

    def perform_debos_action(self, props):
        return None