Twofold:

"fqdn" is usually a puppet fact, I suspect you wouldn't find that if you 
grepped your hiera data. Try these as root on any node:

facter fqdn
facter -p | less

If you do have a hiera key called "fqdn", you can try looking it up on any host 
which has your environments in the usual place and using the explain parameter 
to have it tell you what's wrong.

puppet lookup --node myhost.me.com --environment production --explain 
myclass::someparam
puppet lookup --node myhost.me.com --environment production --explain fqdn
puppet help lookup | less

On Tue, Dec 05, 2017 at 10:44:56AM -0800, dkoleary wrote:
>    Hi;
>    I'm running open source puppet server ver 5.  So far, I've been
>    exceedingly happy with the performance and maintainability of it.  I'm
>    about to start a rewrite of a module and would like to verify some hiera
>    data.  Quick google search shows what looks like it should be the perfect
>    tool - problem is, it doesn't work.
>    On the puppet server, I run:
>    # puppet lookup fqdn
>    Error:  Could  not run:  Could  not find a directory environment named
>    'unconfigured' anywhere in the path:  /etc/puppetlabs/code/environments.
>    Does the directory exist?
> 
>    I tried adding the environment with the same result:
>    # puppet lookup --environment production fqdn
>    Error:  Could  not run:  Could  not find a directory environment named
>    'unconfigured' anywhere in the path:  /etc/puppetlabs/code/environments.
>    Does the directory exist?
>    Puppet environments, in my setup, are established via an external node
>    classifier.  I tried adding 'environment = production' to the user section
>    of /etc/puppetlabs/puppet/puppet.conf but that didn't have any affect
>    either.  Even with that, though, I would have thought specifying the
>    environment on the command line would resolve that.
>    Has anyone seen this and know what I may have messed up and/or how to work
>    around it?
>    Any hints/tips/suggestions greatly appreciated.
>    Doug O'Leary
> 
>    --
>    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 [1]puppet-users+unsubscr...@googlegroups.com.
>    To view this discussion on the web visit
>    
> [2]https://groups.google.com/d/msgid/puppet-users/ae431f1f-02de-4ad2-abdb-92ed5288ef15%40googlegroups.com.
>    For more options, visit [3]https://groups.google.com/d/optout.
> 
> References
> 
>    Visible links
>    1. mailto:puppet-users+unsubscr...@googlegroups.com
>    2. 
> https://groups.google.com/d/msgid/puppet-users/ae431f1f-02de-4ad2-abdb-92ed5288ef15%40googlegroups.com?utm_medium=email&utm_source=footer
>    3. https://groups.google.com/d/optout

-- 
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/20171205191031.zmyeavuo2dzzz4b4%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to