I have declared in my puppet server my class "lab" , this class create
one
archive in the agent but when i sync from agent throws error:
......
info: Applying configuration version ''1354468151''
*err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could not
retrieve information from source(s) puppet:///modules/lab/files/date.txt at
/etc/puppet/modules/lab/manifests/init.pp:10*
......
My structure in puppet master is:
/etc/puppet/manifests/site.pp
/etc/puppet/modules/lab/manifests/init.pp
/etc/puppet/modules/lab/files/date.txt
My init.pp is:
class lab {
file { "/root/date.txt":
ensure => file,
mode => 640,
owner => root,
group => root,
source => "puppet:///modules/lab/files/date.txt",
}
}
My site.pp
node ''lab1.example.com'' {
include lab
}
--
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/-/TVKDTGyB8foJ.
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.
Craig White
2012-Dec-04 22:00 UTC
Re: [Puppet Users] Agent error with class (puppet server)
On Dec 4, 2012, at 2:16 PM, Kazor wrote:> I have declared in my puppet server my class "lab" , this class create one archive in the agent but when i sync from agent throws error: > > ...... > info: Applying configuration version ''1354468151'' > err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could not retrieve information from source(s) puppet:///modules/lab/files/date.txt at /etc/puppet/modules/lab/manifests/init.pp:10 > ...... > > My structure in puppet master is: > > /etc/puppet/manifests/site.pp > /etc/puppet/modules/lab/manifests/init.pp > /etc/puppet/modules/lab/files/date.txt > > My init.pp is: > > class lab { > > file { "/root/date.txt": > ensure => file, > mode => 640, > owner => root, > group => root, > source => "puppet:///modules/lab/files/date.txt", > } > } > > > My site.pp > > node ''lab1.example.com'' { > include lab > }---- looks good, try replacing source => "puppet:///modules/lab/files/date.txt", with source => "puppet:///modules/lab/date.txt", 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Diogo Martinez
2012-Dec-05 11:07 UTC
[Puppet Users] Re: Agent error with class (puppet server)
Craig is correct. Directory files doesnt need to be declared. It is resolved by puppet structure. Em terça-feira, 4 de dezembro de 2012 19h16min39s UTC-2, Kazor escreveu:> > I have declared in my puppet server my class "lab" , this class create one > archive in the agent but when i sync from agent throws error: > > ...... > info: Applying configuration version ''1354468151'' > *err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could > not retrieve information from source(s) > puppet:///modules/lab/files/date.txt at > /etc/puppet/modules/lab/manifests/init.pp:10* > ...... > > My structure in puppet master is: > > /etc/puppet/manifests/site.pp > /etc/puppet/modules/lab/manifests/init.pp > /etc/puppet/modules/lab/files/date.txt > > My init.pp is: > > class lab { > > file { "/root/date.txt": > ensure => file, > mode => 640, > owner => root, > group => root, > source => "puppet:///modules/lab/files/date.txt", > } > } > > > My site.pp > > node ''lab1.example.com'' { > include lab > } > >-- 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/-/168AOcgTj5MJ. 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.
Miguel Angel Coa Morales
2012-Dec-05 15:14 UTC
Re: [Puppet Users] Agent error with class (puppet server)
Thanks for the clarification. I edit the "source" in my class with the mention of Craig and now is solved. Best regards! El 05-12-2012, a las 8:07, Diogo Martinez <diogo.p.martinez@gmail.com> escribió:> Craig is correct. Directory files doesnt need to be declared. It is resolved by puppet structure. > Em terça-feira, 4 de dezembro de 2012 19h16min39s UTC-2, Kazor escreveu: > I have declared in my puppet server my class "lab" , this class create one archive in the agent but when i sync from agent throws error: > > ...... > info: Applying configuration version ''1354468151'' > err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could not retrieve information from source(s) puppet:///modules/lab/files/date.txt at /etc/puppet/modules/lab/manifests/init.pp:10 > ...... > > My structure in puppet master is: > > /etc/puppet/manifests/site.pp > /etc/puppet/modules/lab/manifests/init.pp > /etc/puppet/modules/lab/files/date.txt > > My init.pp is: > > class lab { > > file { "/root/date.txt": > ensure => file, > mode => 640, > owner => root, > group => root, > source => "puppet:///modules/lab/files/date.txt", > } > } > > > My site.pp > > node ''lab1.example.com'' { > include lab > } > > > -- > 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/-/168AOcgTj5MJ. > 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 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.