Background
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 = [ 'ntp51.ex.com','ntp3.ex.com' ] }
and installed this ntp module and have created a node like so
node testip {
include myconfig::ntpp
}
Problem
/etc/puppet/modules/myconfig/manifests/init.pp
contains
class myconfig::ntpp {
include common
class {'ntp':
server_list => $ntpServerList
# server_list => ['ntp.ex.com'] # 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
Question
Can anyone figure out what is wrong with my myconfig::ntpp
class?