puppet-3.4.3-1.el6.noarch error:Could not evaluate: Could not retrieve information from environment production source

57 views
Skip to first unread message

BravePig2013

unread,
Mar 28, 2014, 3:49:39 AM3/28/14
to puppet...@googlegroups.com
Hi All, I am newbie to puppet. when I try to source file from the puppet master, I met the following problem that almost make me crazy. I have tried many methods, but still not solved. Can someone help me to point the mistake out? thanks in advance.

======puppet master====
site.pp:
#1. file resource
file {
  '/tmp/puppet_test.txt':
  source => "puppet:///modules/test/puppet_test.txt"; 
  }

tree of modules:
[root@master puppet]# tree
.
|-- auth.conf
|-- autosign.conf
|-- fileserver.conf
|-- manifests
|   |-- site.pp
|   |-- site.pp.linux
|   `-- site.pp.windows
|-- modules
|   `-- test
|       `-- files
|           `-- puppet_test.txt


======puppet client=====
[root@client tmp]# puppet agent --test
Notice: Ignoring --listen on onetime run
Info: Retrieving plugin
Info: Caching catalog for client.puppet.com
Info: Applying configuration version '1395993113'
Error: /Stage[main]/Main/Node[client.puppet.com]/File[/tmp/puppet_test.txt]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/test/puppet_test.txt
Notice: Finished catalog run in 0.19 seconds

José Luis Ledesma

unread,
Mar 28, 2014, 10:59:33 AM3/28/14
to puppet...@googlegroups.com

Perhaps it is  the ;

It should be nothing being the last parameter or a ,

Regards

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/334f041b-bf56-4ad5-8081-0aad090553a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jcbollinger

unread,
Mar 28, 2014, 4:04:57 PM3/28/14
to puppet...@googlegroups.com


On Friday, March 28, 2014 9:59:33 AM UTC-5, Jose Luis Ledesma wrote:

Perhaps it is  the ;

It should be nothing being the last parameter or a ,


No, the semicolon is allowed as a separator between two resource declarations in the same block, or, for convenience, after the end of the last:

file {
  '/tmp/tst': ensure => 'directory';
  '/tmp/tst/1': ensure => 'present';
}

In any case, if it were a problem with DSL syntax then the catalog would fail to compile.  That's not the OP's case -- his error occurs during catalog application.

I think it's more likely that the file modules/test/files/puppet_test.txt is not readable by the master.  For instance, it may be owned by root:root and have mode 0640, with the master running as user puppet:puppet.  Or any of the directories in the path to that file might be unreadable / untraversible by the Puppet user.


John

José Luis Ledesma

unread,
Mar 28, 2014, 4:50:12 PM3/28/14
to puppet...@googlegroups.com

Right, my bad

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages