Have you tried plain YAML ? Your code looks OK, but I cannot be certain without tinkering. My initial thought is that the eyaml backend may be to blame.
"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." Bill Waterson (Calvin & Hobbes) > On Apr 29, 2015, at 5:39 AM, Dan Gibbons <dangibbons....@gmail.com> wrote: > > Hi, > > I'm just starting to use create_resources and hash merging which I have > working but I'm not sure how I can avoid duplicating some of the hash values > further up in the hierarchy. > > For example: > > - I have set :merge_behavior: deeper and installed the deep_merge gem > - I'm using the eyaml backend > > # hiera.yaml (partial) > :hierarchy: > - "node/%{::fqdn}" > - "%{::environment}" > - "%{::location}" > - "%{::flavour}" > - common > > > # common.eyaml > --- > windows_webconfig: > website1: > name: MyWebSiteExample > 32_bit: false > pipeline_mode: Integrated > runtime_version: v4.0 > root_web_folder: 'd:\webroot' > bindings: > - > port: 80 > host_header: dan.local.com > ip_address: * > protocol: http > website2: > name: MyWebSiteExample2 > 32_bit: false > pipeline_mode: Integrated > runtime_version: v4.0 > root_web_folder: 'd:\webroot' > bindings: > - > port: 80 > host_header: dan.somewhere.com > ip_address: * > protocol: http > > > Now what I'd like to do is only update the bindings for particular > environments and not have to duplicate the whole hash, something like this: > > # uat.eyaml > --- > windows_webconfig: > website1: > bindings: > - > port: 80 > host_header: dan.uat.com > ip_address: * > protocol: http > website2: > bindings: > - > port: 80 > host_header: dan.uat.com > ip_address: * > protocol: http > > > The above (uat.eyaml) doesn't work unless I replicate the whole hash so I was > wondering if this is by design of the merging and if there is another way I > can achieve my aim of not duplicating the site definitions. I experimented > with separating the "bindings" out into a separate hash and passing this into > create_resources but it's kind of messy and doesn't work very well. > > Thanks in advance. > > Dan > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/9936a2a4-0dd7-44ec-b286-919b999448a9%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/45744041-6452-4C05-AEAB-0EEC911AB7B0%40icloud.com. For more options, visit https://groups.google.com/d/optout.