Puppet and foreman "Could not retrieve information"

Hi all
I have setup foreman and create a test module
The init.pp file path is
/etc/puppet/environments/production/modules/test/manifests/init.pp
I wanted to move files from Foreman server to the clients
here is the init.pp file

class test {
file {"/root/tryfile":
ensure => present,
source => "puppet:///modules/test/files/tryfile",
mode => 644,
owner => root,
group => root
}
}

I created the files Directory and added the* tryfile* in
/etc/puppet/environments/production/modules/test/files/tryfile

and that is what is in the /etc/puppet/fileserver.conf
[files]
allow *

[modules]
allow *

[plugins]
allow *

but when I run puppet I get that error
Error: /Stage[main]/Test/File[/root/tryfile]: Could not evaluate: Could not
retrieve information from environment production source(s)
puppet:///modules/test/files/tryfile

Please I need help in why I got that error

Not really a Foreman question, but since it's an easy answer… :slight_smile:

From http://docs.puppetlabs.com/references/latest/type.html#file-attribute-source
you need:

source => "puppet:///modules/test/tryfile",

in your file resource.

Greg

Thanks Greg.
That worked.

··· On Monday, May 19, 2014 6:49:35 PM UTC+3, Greg Sutcliffe wrote: > > Not really a Foreman question, but since it's an easy answer... :) > > From > http://docs.puppetlabs.com/references/latest/type.html#file-attribute-source > you need: > > source => "puppet:///modules/test/tryfile", > > in your file resource. > > Greg >