UNless the hiera.yaml you provided is incomplete, you did not tur on deep 
merging.

https://docs.puppet.com/hiera/3.1/configuring.html#deepmergeoptions
Dan White | d_e_wh...@icloud.com
------------------------------------------------
“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 Jun 03, 2016, at 02:57 PM, Leonard Smith <lrsm...@umich.edu> wrote:

Deep gem is installed. However this should work with native correct if all I am 
looking to have it do is create both '/' and 'test' vhost, without ovverriding 
each other.



On Friday, June 3, 2016 at 2:47:45 PM UTC-4, Peter Kristolaitis wrote:
Did you install the deep_merge gem when using the deeper merge option?  The gem 
is required when using deep or deeper merging.


On 2016-06-03 02:38 PM, Leonard Smith wrote:
I've been trying to track down a problem with hiera_hash not merging.

puppet-3.8.6-1.el7
hiera-1.3.4-1.el7

## hiera.yaml
:hierarchy:
  - test
  - common

## test.yaml
---
rabbitmq_profile::vhosts:
  'test' :
    ensure: present

## common.yaml
---
rabbitmq_profile::vhosts:
  '/' :
    ensure: present

## rabbitmq_profile.pp

class rabbitmq_profile (

$vhosts = hiera_hash('rabbitmq_profile::vhosts',{})

) {

  notify { "<>$vhosts": }
  create_resources(rabbitmq_vhost, $vhosts )
}

## END


When I apply the manifest it creates the vhost specified in test.yaml but not 
the one in comon.yaml. I expected it to merge the has from both yamls and 
create the '/' and 'test' vhosts.

 If I remove test from hiera.yaml it creates the '/' vhost fine. I've tried 
setting the merge_behavior explicitly to native, deep and deeper, but I still 
see the behavior where it picks up the hash form the first yaml file it 
encounters and ignores the rest.


--
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9073d972-61d4-4454-bf0a-8dad4f889062%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/dda7b1bd-3380-48dc-89d8-5a5c64d5fce0%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/e77e61c8-54c8-408c-b865-e213c9368beb%40me.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to