Guy
I think you need to pass in your environment to hiera using '::environment'
rather than 'environment', as your hiera.yaml is looking for
'::environment'...
Similar issue/resolution
here:
https://ask.puppetlabs.com/question/3635/how-do-i-specify-environment-to-hiera-on-the-command-line/?answer=3647#post-id-3647
Cheers
Gav
On Tuesday, 16 December 2014 14:32:06 UTC, guymatz wrote:
>
> Hiera is not honoring my hierarchy :-(
>
> gmatz@bunnybear ~/Code/puppet $ cat hiera.yaml
> ---
> :hierarchy:
> *- "%{::environment}"*
> - common
> :backends:
> - eyaml
> - yaml
> :merge_behavior: deeper
> :eyaml:
> :datadir: /home/gmatz/Code/puppet/hieradata
> :pkcs7_private_key: /home/gmatz/Code/puppet/keys/private_key.pkcs7.pem
> :pkcs7_public_key: /home/gmatz/Code/puppet/keys/public_key.pkcs7.pem
> :yaml:
> :datadir: /home/gmatz/Code/puppet/hieradata
>
> gmatz@bunnybear ~/Code/puppet $ grep activemq_password
> hieradata/production.eyaml
> activemq_password: &activemq_password ENC[PKCS7,MIIBeQYJKggEhMIIBHQIBAD. .
> . .
>
> but it only looks for common:
>
> gmatz@bunnybear ~/Code/puppet $ hiera -d -c ~/Code/puppet/hiera.yaml
> activemq_password environment=production
> DEBUG: 2014-12-16 09:31:19 -0500: [eyaml_backend]: Hiera eYAML backend
> starting
> DEBUG: 2014-12-16 09:31:19 -0500: [eyaml_backend]: Set option: datadir =
> /home/gmatz/Code/puppet/hieradata
> DEBUG: 2014-12-16 09:31:19 -0500: [eyaml_backend]: Set option:
> pkcs7_private_key = /home/gmatz/Code/puppet/keys/private_key.pkcs7.pem
> DEBUG: 2014-12-16 09:31:19 -0500: [eyaml_backend]: Set option:
> pkcs7_public_key = /home/gmatz/Code/puppet/keys/public_key.pkcs7.pem
> DEBUG: 2014-12-16 09:31:19 -0500: [eyaml_backend]: Looking up
> activemq_password in eYAML backend
> DEBUG: 2014-12-16 09:31:19 -0500: [eyaml_backend]: Looking for data source
> common
> DEBUG: 2014-12-16 09:31:19 -0500: Hiera YAML backend starting
> DEBUG: 2014-12-16 09:31:19 -0500: Looking up activemq_password in YAML
> backend
> DEBUG: 2014-12-16 09:31:19 -0500: Looking for data source common
> nil
>
> Any thoughts would be greatly appreciated!!
>
> Thanks,
> Guy
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/e2dd5227-2432-4b6a-a1c6-8898fd9e40a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.