Thanks for that, I have read that blog plus the more recent followup.  I 
also have tried using the --explain flag for the lookup function.

Again if I run puppet lookup --node test.demo.local --explain demo::webhost 
on the puppet master, it produces a value for demo::webhost.  If I run on 
the agent node, it complains that hiera.yaml is using version 3 and that's 
deprecated, then produces no resulting value.

When puppet runs on the demo webserver with the class (that uses the 
demo::webhost value to configure an apache vhost resource), the 
demo::webhost value appears to be empty.  It produces a apache vhost config 
file in /etc/httpd/conf.d which has no hostname, no vhost name, no server 
name.  Everywhere in the resource where demo::webhost is used, there is no 
value in the resulting apache config file.

So perhaps the problem is in configuring hiera on the agents?  I guess I 
need to deploy the puppet/hiera module and try to ensure that all the 
agents are configured to use Hiera 5?  I haven't read anywhere that I need 
to deploy hiera.yaml files to agents, is that what I'm missing?


On Monday, May 29, 2017 at 2:58:18 AM UTC-4, amateo wrote:
>
>         Take a look at https://puppet.com/blog/debugging-hiera 
> <https://www.google.com/url?q=https%3A%2F%2Fpuppet.com%2Fblog%2Fdebugging-hiera&sa=D&sntz=1&usg=AFQjCNFsec44FVrEZDblVBLzYE5gRokbKg>
>  
> for help 
> debuggin hiera problems. 
>
> El 26/05/17 a las 22:59, Sean escribió: 
> > Hi, 
> > 
> > I'm working to prototype an upgrade of our environment to puppet 4.10 
> > and use hiera 5 data layers.  Today, we're running puppet 3, and I've 
> > refactored a our main modules to use hiera module data instead of 
> > params.pp.  It better suits our needs to have the data layers setup this 
> > way.  This prototype is also leveraging r10k, so the environment data is 
> > stored in a control repo branch for each puppet environment. 
> > 
> > Anyway, I'm struggling because the when I run puppet lookup on the 
> > puppet master, I get a value for a parameter that hiera should be 
> > serving data.  In the module data layer, the parameter defaults to 
> > facts.hostname.  When I run puppet agent or puppet lookup on a node that 
> > this module is applied to, I get nothing...e.g. if I use that piece of 
> > data in an apache::vhost define, the config file in /etc/httpd/conf.d/ 
> > is 25-.mydomain.com.conf where it should be 25-www.mydomain.com.conf 
> > because www is the value parameter hiera is looking up.  The same result 
> > holds true even when I override the default value with something 
> > specific at the environment layer, the lookup on the puppet master 
> > produces the right value but the lookup on the agent returns nothing. 
> > 
> > I'm something at a loss of what could cause this with out any errors or 
> > useful information produced.  Might anyone have an idea where I've gone 
> > wrong? 
> > 
> > Thanks! 
> > 
> > -- 
> > 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:> 
> > <mailto:puppet-users+unsubscr...@googlegroups.com <javascript:>>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/31f68898-9b99-4b8b-8362-b588c5ea0eae%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/puppet-users/31f68898-9b99-4b8b-8362-b588c5ea0eae%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
> -- 
> Angel L. Mateo Martínez 
> Sección de Telemática 
> Área de Tecnologías de la Información 
> y las Comunicaciones Aplicadas (ATICA) 
> http://www.um.es/atica 
> Tfo: 868889150 
> Fax: 868888337 
>

-- 
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/f7dfe5dd-401e-4a9f-99f9-758ef44de472%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to