Skip to content

Include without key or sequence #53

@ceccocats

Description

@ceccocats

Referring to #7

Having the files
0.yml:

foo0: bar0

1.yml:

foo1: bar1

Its possible to load multiple yaml with these methods:

  • using keys
     0: !include include.d/0.yml
     1: !include include.d/1.yml
    
    and obtain:
     {0: {'foo0': 'bar0'}, 1: {'foo1': 'bar1'}}
    
  • using sequence
     - !include include.d/0.yml
     - !include include.d/1.yml
    
    and obtain
     [{'foo0': 'bar0'}, {'foo1': 'bar1'}]
    

What i would like to obtain is:

{'foo0': 'bar0', 'foo1': 'bar1'}

I think that by using yaml Merge Key I should obtain what I want:

<<: !include include.d/0.yml
<<: !include include.d/1.yml

Unfortunately i get expected a mapping or list of mappings for merging, but found scalar error.

Its possible to support this include pattern?

Thanks,
Francesco

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