Re: [Puppet Users] dynamic hiera_config setting

2013-08-12 Thread Pablo Wright
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  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+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.
>
>

-- 
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.


Re: [Puppet Users] dynamic hiera_config setting

2013-08-13 Thread jamese
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 > 
> 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 . 
> > To post to this group, send email to 
> > puppet...@googlegroups.com. 
>
> > 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.




Re: [Puppet Users] dynamic hiera_config setting

2013-08-13 Thread Henrik Lindberg

On 2013-13-08 24:25, jamese wrote:

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.


That is correct, it does not do that.
- henrik



--
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.


Re: [Puppet Users] dynamic hiera_config setting

2014-06-17 Thread Alex Harvey


On Wednesday, August 14, 2013 12:57:17 PM UTC+10, Henrik Lindberg wrote:

> 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. 
> > 
> That is correct, it does not do that. 
> - henrik 
>

I am also encountering this issue (puppet 3.3.1) - is it still a known 
issue?

-- 
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/203fc18c-9c60-4723-9f01-aab2e99115de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] dynamic hiera_config setting

2014-06-17 Thread Alex Harvey

On Wednesday, June 18, 2014 10:47:20 AM UTC+10, Alex Harvey wrote:
>
>
> I am also encountering this issue (puppet 3.3.1) - is it still a known 
> issue?
>

Ignore - I found the open Jira ticket here
https://tickets.puppetlabs.com/browse/HI-46 

-- 
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/06f18960-0a21-4b32-bd2b-88e997b020f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.