Skip to content

Broken homeserver.yaml when not supplying additional_config #2

@lkroll

Description

@lkroll

The generated homeserver.yaml is faulty when not supplying additional_config.
The default empty Hash is included in the first line resulting in a broken yaml file that can't be parsed correctly.

The first line looks like this:

--- {}

The empty Hash is included as {} by hash2yaml and not as an empty String.

A fix would be to check if the Hash is empty and use --- instead of --- {} as the value.

This change in config.pp works as a quick fix from my testing:

concat::fragment { 'synapse-homeserver-config':
  target  => "${synapse::conf_dir}/homeserver.yaml",
  content => empty($additional_config) ? {
    true  => "---\n",
    false => hash2yaml($additional_config)
  },
  order   => '01'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions