Skip to content

Q. How to remove keys on merge? #158

Open
@cunningr

Description

@cunningr

Expected Behaviour

If I am setting a key/object in my top level globals.yaml at a specific lower level, I want to be able to remove that key (e.g. not just set the value: null but actually del). For example:

global.yaml

modules_to_deploy:
  module1: <config-mod1>
  module2: <config-mod2>
  module3: <config-mod3>

then in my special_dr_site.yaml:

modules_to_deploy:
  module2: #remove

After merging, for my special_dr_site, I want the resulting yaml to be:

modules_to_deploy:
  module1: <config-mod1>
  module3: <config-mod3>

Actual Behaviour

Not sure if/how this can be achieved?

Reproduce Scenario (including but not limited to)

simply try the simple example above.

Steps to Reproduce

see above example

Platform and Version

Any

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions