Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knockouts don't work for: Hashtables #128

Open
raandree opened this issue Aug 17, 2022 · 0 comments
Open

Knockouts don't work for: Hashtables #128

raandree opened this issue Aug 17, 2022 · 0 comments

Comments

@raandree
Copy link
Contributor

raandree commented Aug 17, 2022

Knockouts don't work as expected / produce unexpected results assuming that 'knockout_prefix' is implemented similar like in Puppet. There is not much documentation and descriptions in Puppet and the best summary of that feature is on StackOverflow: Using knockout_prefix in puppet hiera hierarchy:

Lower Level:

Car:
  Brand: VW
  Model: Golf
  Engine:
    Volume: 2.0

Higher Level:

Car:
  --Model:
  Color: Red
  Engine:
    Type: Gasoline

Actual RSOP:

Car:
  Color: Red                                                                                    AllNodes\Dev\DSCFile01
  --Model: 
  Engine:
    Type: Gasoline                                                                              AllNodes\Dev\DSCFile01
    Volume: 2                                                                                         Roles\FileServer
  Brand: VW

Expected RSOP:

Car:
  Color: Red                                                                                    AllNodes\Dev\DSCFile01
  Engine:
    Type: Gasoline                                                                              AllNodes\Dev\DSCFile01
    Volume: 2                                                                                         Roles\FileServer
  Brand: VW

Datum.yml

  Car:
    merge_hash: deep
    merge_options:
      knockout_prefix: --

The key model was knocked out but the key for knocking out is added to the result. This is not expected and results in errors when splatting the hashtable to the DSC resource.

  • Is there a reason why the knocking out key is added to the result?
  • When should it been removed? After the merge, while merging?
  • How does knockout work with more than two layers / how is it supposed to work?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant