Hi Pablo,

Thanks for the response.

I've tried setting the environment in the master section, the agent 
section, the main section.
Regardless of whether I set the environment anywhere in the masters 
puppet.conf, it always looks for the hiera.yaml file in the production 
directory.

I was hoping that it would derive the hiera.yaml path dynamically from the 
clients' environment when it checks in, but this seems not to be the case.


On Monday, 12 August 2013 16:35:25 UTC+1, Pablo Wright wrote:
>
> Hi James, 
> One thing to take into account here is that hiera_config is under the 
> [master] section, so it might not take into account settings in 
> [agent], such as the environment. 
> Try running puppet master --configprint environment to see if it's set 
> to the default (which is production). 
>
> Hope this helps! 
> Pablo D. Wright 
> Technical Operations  - www.edrans.com 
> Buenos Aires: +54 11 5368 5839  - Ext. 8017 | 
> Las Vegas: +1 5057183014 
>
>
> On Fri, Aug 9, 2013 at 4:59 AM, jamese <james.e...@gmail.com <javascript:>> 
> wrote: 
> > 
> > Hi all, 
> > 
> > I'm playing with a new setup of puppet 3.2.3 and hiera 1.2.0 on an EL6 
> server. 
> > 
> > The puppet config is stored in a git repo (as per 
> https://puppetlabs.com/blog/git-workflow-and-puppet-environments/) 
> > 
> > I want to use a separate hiera.yaml file per environment, so in the 
> puppet.conf, I have the following: 
> > 
> > [master] 
> >     hiera_config = /vagrant/puppetenv/$environment/hiera.yaml 
> > 
> >     manifest   = /vagrant/puppetenv/$environment/manifests/site.pp 
> >     modulepath = /vagrant/puppetenv/$environment/modules 
> > 
> > 
> > For some reason, puppet keeps trying to look for the hiera.yaml file at: 
> /vagrant/puppetent/production/hiera.yaml (confirmed via strace), regardless 
> of which environment I use on the agent. 
> > So it seems to be ignoring the $environment portion of the path. 
> > 
> > I noticed there is a bug raised which seems related to this 
> http://projects.puppetlabs.com/issues/11784 
> > 
> > I know I could use a single hiera.yaml file across all environments, but 
> this then makes hiera backend/hierarchy changes more difficult. 
> > 
> > Is anybody able to clarify whether this should actually work or not? 
>  The linked bug suggests that it will and/or it won't and/or it might. 
> /confused 
> > 
> > Thanks 
> > 
> > James 
> > 
> > -- 
> > 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 <javascript:>. 
> > To post to this group, send email to 
> > puppet...@googlegroups.com<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/puppet-users. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to