Try using the environment from the hierarchy:

:hierarchy:
    - %{environment}/%{fqdn}
    - %{environment}/common
    - %{fqdn}
    - common
:backends:
    - yaml
:yaml:
    :datadir: '/etc/puppet/hieradata'

/etc/puppet/hieradata/
|-- dev
|-- production
`-- qa

This works for me

“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)

----- Original Message -----
From: "phundisk" <alex.farh...@currensee.com>
To: puppet-users@googlegroups.com
Sent: Wednesday, June 5, 2013 2:18:41 PM
Subject: [Puppet Users] Re: Hiera and environments

I am also having the same issue you were having. When I removed the 
'%{environment}' part of the datadir, hiera works fine, however for me to have 
different development stages, I need to be able to specify environments so I 
don't accidentally take down production with a change to hiera variable. Did 
anyone find a way for this to work? 


:yaml: 
   :datadir: '/etc/puppet/environments/%{environment}/hieradata/' 

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to