Hi I largely copied the example in http://docs.puppetlabs.com/learning/modules1.html. But I''m getting an error when running the following from the client: puppet agent --server puppetmaster --waitforcert 60 --test err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not retrieve information from environment production source(s) file:/etc/puppet/modules/ntp/files/ntp.conf at /etc/puppet/modules/ntp/manifests/init.pp:28 on the puppet server I have the following: # init.pp class ntp { case $operatingsystem { sles: { $service_name = ''ntpd'' $conf_file = ''ntp.conf'' } } # package { ''ntp'': # ensure => installed, # } service { ''ntp'': name => $service_name, ensure => running, enable => true, subscribe => File[''ntp.conf''], } file { ''ntp.conf'': path => ''/etc/ntp/ntp.conf'', ensure => file, # require => Package[''ntp''], # source => "puppet:///modules/ntp/files/${conf_file}", source => "/etc/puppet/modules/ntp/files/${conf_file}", } } Furhter info from puppet server: puppet apply --configprint: /etc/puppet/modules:/usr/share/puppet/modules pluginsource = puppet://puppet/plugins pluginsync = false Can someone please help me please, as I''m lost with this error? Thanks in advance Dan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/c6JaSY1a6BgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Oct 15, 2012 at 1:58 PM, Dan <dan.track@gmail.com> wrote:> # source => "puppet:///modules/ntp/files/${conf_file}", > source => "/etc/puppet/modules/ntp/files/${conf_file}", >It''s these lines. What you want to do is specify where the configuration file exists on the puppet master using a syntax like this: "puppet://<optional puppet master>/modules/<module name>/<configuration file in files directory>", Try: source => "puppet:///modules/ntp/${conf_file}", Puppet assumes the files directory so it was looking for /etc/puppet/modules/ntp/files/files/ntp.conf -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
You''re a start. Many thanks for that. Much appreciated. Dan On Monday, October 15, 2012 9:58:14 PM UTC+1, Dan wrote:> > Hi > > I largely copied the example in > http://docs.puppetlabs.com/learning/modules1.html. But I''m getting an > error when running the following from the client: > > puppet agent --server puppetmaster --waitforcert 60 --test > err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not > retrieve information from environment production source(s) > file:/etc/puppet/modules/ntp/files/ntp.conf at > /etc/puppet/modules/ntp/manifests/init.pp:28 > > on the puppet server I have the following: > > # init.pp > > class ntp { > case $operatingsystem { > sles: { > $service_name = ''ntpd'' > $conf_file = ''ntp.conf'' > } > } > > # package { ''ntp'': > # ensure => installed, > # } > > service { ''ntp'': > name => $service_name, > ensure => running, > enable => true, > subscribe => File[''ntp.conf''], > } > > file { ''ntp.conf'': > path => ''/etc/ntp/ntp.conf'', > ensure => file, > # require => Package[''ntp''], > # source => "puppet:///modules/ntp/files/${conf_file}", > source => "/etc/puppet/modules/ntp/files/${conf_file}", > } > } > > > Furhter info from puppet server: > > puppet apply --configprint: > /etc/puppet/modules:/usr/share/puppet/modules > pluginsource = puppet://puppet/plugins > pluginsync = false > > > Can someone please help me please, as I''m lost with this error? > > Thanks in advance > Dan > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/sRRMh25Wk-oJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.