Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

allow usage of hiera lookup_options #99

@tuxmea

Description

@tuxmea

Within a hiera hierarchy, one has the option to set the merge behavior using the key "lookup_options".

Example:
data/common.yaml

lookup_options:
  <key>:
    merge: <merge behavior>
  convert_to: <Data Type> # Usually "Sensitive"

The following merge behavior options are possible:

  • first - the default hiera behavior
  • unique - used on arrays
  • hash - merges all hash keys (on first level)
  • deep - similar to hash, but merges subkeys, too

The hiera key lookup_options should always be the very first in the list of keys (if set).

HDM should show the lookup_options providing a text message above the top hierarchy.

lookup option: merge: first, convert_to: <Data Type>

Note: lookup options can be set in every hiera hierarchy.
Updated test code is in mulitple_environmenrs.
Node sse8epsu.example42.training has lookup option for profile::auth::sshd_config_allowgroups set to 'first' and in common it is set to 'unique'.

Hiera uses deep merge on lookup_options.

e.g.

  1. Node specific:
lookup_options:
    <key1>:
     merge: deep
  <key2>:
    merge: first
    convert_to: 'Sensitive'
  1. common:
lookup_options:
    <key1>:
     merge: first

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions