Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I would like to apply this idea of having a common class that includes all the specific info about my setup.

So I have created /etc/puppet/modules/common/manifests/init.pp with

class common { include common::data }
class common::data { $ntpServerList = [ '','' ] }

and installed this ntp module and have created a node like so

node testip {
  include myconfig::ntpp


/etc/puppet/modules/myconfig/manifests/init.pp contains

class myconfig::ntpp {
  include common
  class {'ntp':
      server_list => $ntpServerList
#          server_list => ['']    # this works

and I would have expected that $ntpServerList would be available, but it isn't. The error is

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template ntp/ntp.conf.erb:
  Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb
  Line: 64
  Detail: Could not find value for 'server_list' at /etc/puppet/modules/ntp/templates/ntp.conf.erb:25
 at /etc/puppet/modules/ntp/manifests/init.pp:183 on node testip


Can anyone figure out what is wrong with my myconfig::ntpp class?

share|improve this question
up vote 4 down vote accepted

You need to fully qualify your variables; $common::data::ntpServerList.

As it is, your code is looking for a variable called ntpServerList in the local scope ($myconfig::ntpp::ntpServerList) which doesn't exist, so it falls back to the top scope ($::ntpServerList) where it also doesn't exist.

See here for more details.

share|improve this answer
Very impressive! It worked! – Sandra Aug 24 '12 at 23:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.