Ask Your Question

Facts not found from world.json

asked 2017-01-16 22:13:15 -0500

cm01 gravatar image

Hi Guys,

see files etc below, but basically it can't seem to see ANY vars in world.json... ?
(File shown is subset of the full thing)



vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/
codedir = /etc/puppetlabs/code

ca = false
dns_alt_names =

reports = store, foreman
reportdir = $vardir/reports

server      =
ca_server   = pmca.ops.x.x.x
environment = qa2



  - json

  - "%{hostname}.%{nt_environment}.%{nt_location}"
  - "%{nt_type}.%{nt_environment}.%{nt_location}"
  - "%{nt_type}.%{nt_environment}"
  - "%{nt_environment}.%{nt_location}"
  - "%{nt_environment}"
  - "%{nt_location}"
  - world
  - default

:logger: console # debug

    :datadir: '/etc/puppetlabs/code/environments/%{::environment}/hieradata' # this is the default anyway


    -rw-rw-r-- 1 jenkins jenkins 2398 Jan 14 00:38 world.json
       "env" : {
                 "puppetusers" : [

Info: Using configured environment 'qa2'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Failed to parse template common/etc/profile.d/
  Filepath: /etc/puppetlabs/code/environments/qa2/modules/common/templates/etc/profile.d/
  Line: 25
  Detail: undefined method `[]' for nil:NilClass
 at /etc/puppetlabs/code/environments/qa2/manifests/modules/common/manifests/classes/configuration.pp:19:14 on node
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-17 09:23:14 -0500

DarylW gravatar image

updated 2017-01-17 09:24:07 -0500

Are you able to see the facts when running sudo facter -p, puppet facts --environment qa2, or directly in your puppet code (add a notice() or notify resource)? Generally, I always try to create localized variables that I used in my templates. If you look to using epp templates, you actually can declare parameters for your templates and have them explicitly passed in.

Can you show a snippet of the template where it is using your variable?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-01-16 22:13:15 -0500

Seen: 52 times

Last updated: Jan 17 '17