Check your source declaration.
> source => "puppet:///modules/ntp/files/${conf_file}",
If your files are in modules/ntp/files you don't include that in your source
declaration
> source => "puppet:///modules/ntp/${conf_file}",
http://docs.puppetlabs.com/guides/file_serving.html
Cheers,
Den
On 22/06/2011, at 2:03, Craig White <[email protected]> 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...
>
> # 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
>
> # puppet apply -d -e 'include ntp'
> info: Loading facts in datacenter
> info: Loading facts in datacenter
> debug: importing '/etc/puppet/modules/ntp/manifests/init.pp' in environment
> production
> debug: importing '/etc/puppet/modules/ntp/manifests/ntp.pp' in environment
> production
> debug: Automatically imported ntp from ntp into production
> debug: Failed to load library 'selinux' for feature 'selinux'
> debug: Puppet::Type::Package::ProviderUrpmi: file urpmi does not exist
> debug: Puppet::Type::Package::ProviderNim: file /usr/sbin/nimclient does not
> exist
> debug: Puppet::Type::Package::ProviderPkg: file /usr/bin/pkg does not exist
> debug: Puppet::Type::Package::ProviderHpux: file /usr/sbin/swinstall does not
> exist
> debug: Puppet::Type::Package::ProviderYum: file yum does not exist
> debug: Puppet::Type::Package::ProviderZypper: file /usr/bin/zypper does not
> exist
> debug: Puppet::Type::Package::ProviderFink: file /sw/bin/fink does not exist
> debug: Puppet::Type::Package::ProviderAptrpm: file rpm does not exist
> debug: Puppet::Type::Package::ProviderAix: file /usr/bin/lslpp does not exist
> debug: Puppet::Type::Package::ProviderSunfreeware: file pkg-get does not exist
> debug: Puppet::Type::Package::ProviderPorts: file /usr/local/sbin/portversion
> does not exist
> debug: Puppet::Type::Package::ProviderOpenbsd: file pkg_delete does not exist
> debug: Puppet::Type::Package::ProviderRug: file /usr/bin/rug does not exist
> debug: Puppet::Type::Package::ProviderPortupgrade: file
> /usr/local/sbin/portversion does not exist
> debug: Puppet::Type::Package::ProviderPortage: file /usr/bin/emerge does not
> exist
> debug: Puppet::Type::Package::ProviderFreebsd: file /usr/sbin/pkg_delete does
> not exist
> debug: Puppet::Type::Package::ProviderUp2date: file /usr/sbin/up2date-nox
> does not exist
> debug: Puppet::Type::Package::ProviderRpm: file rpm does not exist
> debug: Puppet::Type::Package::ProviderSun: file /usr/sbin/pkgadd does not
> exist
> debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not exist
> debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does not
> exist
> debug: Puppet::Type::Service::ProviderRedhat: file /sbin/service does not
> exist
> debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does not
> exist
> debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc does not
> exist
> debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
> microsoft_windows is missing
> debug: Creating default schedules
> debug: Failed to load library 'shadow' for feature 'libshadow'
> debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
> debug: Puppet::Type::User::ProviderPw: file pw does not exist
> debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does
> not exist
> debug: Puppet::Type::User::ProviderLdap: true value when expecting false
> debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring
> File[/etc/puppet/ssl/certs]
> debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring
> File[/var/lib/puppet/state]
> debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/certs/ubuntu.ttinet.pem]: Autorequiring
> File[/etc/puppet/ssl/certs]
> debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring
> File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
> debug: /File[/var/lib/puppet/state/graphs]: Autorequiring
> File[/var/lib/puppet/state]
> debug: /File[/etc/puppet/ssl/public_keys/ubuntu.ttinet.pem]: Autorequiring
> File[/etc/puppet/ssl/public_keys]
> debug: /File[/etc/puppet/ssl/private_keys/ubuntu.ttinet.pem]: Autorequiring
> File[/etc/puppet/ssl/private_keys]
> debug: /File[/var/lib/puppet/state/classes.txt]: Autorequiring
> File[/var/lib/puppet/state]
> debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring
> File[/var/lib/puppet/state]
> debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring
> File[/var/lib/puppet/state]
> debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
> debug: /File[/var/lib/puppet/clientbucket]: Autorequiring
> File[/var/lib/puppet]
> debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring
> File[/etc/puppet/ssl]
> debug: Finishing transaction 23094380
> debug: Loaded state in 0.00 seconds
> debug: Loaded state in 0.00 seconds
> debug: Prefetching apt resources for package
> debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package}
> ${Version}\n''
> debug: Puppet::Type::Package::ProviderApt: Executing '/usr/bin/dpkg-query -W
> --showformat '${Status} ${Package} ${Version}\n''
> debug: /Stage[main]/Ntp/Service[ntp]/subscribe: subscribes to File[ntp.conf]
> debug: /Stage[main]/Ntp/File[ntp.conf]/require: requires Package[ntp]
> info: Applying configuration version '1308671777'
> err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not retrieve
> information from source(s) puppet:///modules/ntp/files/ntp.conf.debian at
> /etc/puppet/modules/ntp/manifests/ntp.pp:31
> notice: /Stage[main]/Ntp/Service[ntp]: Dependency File[ntp.conf] has
> failures: true
> warning: /Stage[main]/Ntp/Service[ntp]: Skipping because of failed
> dependencies
> debug: Finishing transaction 22597140
> debug: Storing state
> debug: Stored state in 0.00 seconds
> notice: Finished catalog run in 0.08 seconds
> root@ubuntu:/etc/puppet#
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.