tanbro / pyyaml-include

yaml include other yaml
https://pypi.org/project/pyyaml-include/
GNU General Public License v3.0
78 stars 20 forks source link

is it currently supported to set an anchor for the included mapping? #6

Closed woutervh closed 5 years ago

woutervh commented 5 years ago

I was trying to have some inheritance, by including the shared yaml-file:

` file1: !include include.d/1.yaml & shared

section1: <<: *shared foo: bar `

tanbro commented 5 years ago

Oh, Sorry for late.

I tryed anchor, but it doesn't work.

Wo can put anchor NEITHER in main yaml file NOR in incuding files.

If so, the pyyaml will say:

yaml.composer.ComposerError: found undefined alias 'anchor'

And it seems that there's no way to solve the problem... 😓