On 21/06/11 17:03, Craig White wrote: > On Jun 20, 2011, at 3:54 PM, Ken Barber wrote: > >> It does seem like its not being included :-) ... >> >> What does: >> >> echo "# foo" >> /etc/ntp.conf >> puppet apply -d -e 'include ntp' >> >> Do? > ---- > seems so basic - output at bottom > > I have gone over and over the Pro Puppet book and the > http://docs.puppetlabs.com/guides/file_serving.html page and they both are > the same and this should absolutely work. > > # cat modules/ntp/manifests/ntp.pp > # ntp.pp > > class ntp { > case $operatingsystem { > centos, redhat: { > $service_name = 'ntpd' > $conf_file = 'ntp.conf.el' > } > debian, ubuntu: { > $service_name = 'ntp' > $conf_file = 'ntp.conf.debian' > } > } > > package { 'ntp': > ensure => installed, > } > > service { 'ntp': > name => $service_name, > ensure => running, > enable => true, > subscribe => File['ntp.conf'], > } > > file { 'ntp.conf': > path => '/etc/ntp.conf', > ensure => file, > require => Package['ntp'], > source => "puppet:///modules/ntp/files/${conf_file}", > } > } > > # class {'ntp': } > > but no matter what I do, it always errors and says it can't find > /etc/puppet/modules/ntp/files/ntp.conf.debian but yet it is there and > readable all the way...
You don't want the /files/ bit. Puppet automatically looks for module files in the /files/ subfolder. Currently puppet is trying to access /etc/puppet/modules/ntp/files/files/ntp.conf.debian which doesn't exist :) All you need is: source => "puppet:///modules/ntp/${conf_file}" HTH Dan > # ls -l /etc/puppet/modules/ntp/files/ntp.conf.debian > -rw-r--r-- 1 root root 535 2011-06-13 12:55 > /etc/puppet/modules/ntp/files/ntp.conf.debian > > anyway, the output as requested... > > Thanks > > Craig -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.