Skip to content

Nested templates do not work in the config #12

Description

@hnez

When writing a config file one may be tempted to use nested templates like these, where one snippet builds on top of another:

machine_snippets:
  cfg-template: &cfg-template
    setup_template:
      path: /etc/forrest/templates/generic
      parameters:
        RUNNER_VERSION: "2.318.0"
        RUNNER_HASH: "28ed88e4cedf0fc93201a901e392a70463dbd0213f2ce9d57a4ab495027f3e2f"

  os-debian: &os-debian
    << : *cfg-template
    base_image: /srv/forrest/images/debian-12-generic-amd64.raw

  debian-small: &debian-small
    << : *os-debian
    cpus: 4
    disk: 16G
    ram: 4G

This does however not work due to faulty handling of nested merges in the yaml crate used.
See sebastienrousseau/serde_yml#14 and sebastienrousseau/serde_yml#15 for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions