Covered in the docs, https://docs.puppetlabs.com/guides/file_serving.html
remove the string "files/" from the source statement within your file resource.
Ramin On 1/17/2016 5:44 AM, Juanma Lainez wrote:
Hi there, I am new on puppet, got a test lab of two ubuntu 14.04 servers, same network installed puppetmaster and agent successfully, installed certificates and could get the initial catalog and sync invoking puppet agent --test without issues. I tried to push a test file from the master for testing, without success PuupetMaster: srv1 node: srv2 *site.pp file* #/etc/puppet/manifests/site.pp node default {} node 'srv2'{include test} *Test Module directories and files *#/etc/puppet/modules/test* *#/etc/puppet/modules/test/files/test.txt #/etc/puppet/modules/test/manifests/init.pp class test { file {'test.txt': source => 'puppet:///modules/test/files/test.txt', path => '/usr/local/bin/test.txt', ensure => 'present', owner => 'root', group => 'root', mode => 0700, } } when I run puppet agent --test on srv2 node this is the output * root@srv2:/# puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Caching catalog for srv2.home Info: Applying configuration version '1453038058' Error: /Stage[main]/Test/File[test.txt]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/test/files/test.txt Notice: Finished catalog run in 0.07 seconds *the file definitely is on the master* root@srv1:/# ls -hal /etc/puppet/modules/test/files/test.txt -rw-r--r-- 1 root root 0 Jan 17 13:38 /etc/puppet/modules/test/files/test.txt *As I said I am new on Puppet, creating modules and classes, did not have a problem when run this as single manifest, any given help will be very much appreciated Juan -- 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+unsubscr...@googlegroups.com <mailto:puppet-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/66e73c75-e79d-4d2a-accc-598e1d90b88c%40googlegroups.com <https://groups.google.com/d/msgid/puppet-users/66e73c75-e79d-4d2a-accc-598e1d90b88c%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout.
-- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/569C2DC1.1040800%40badapple.net. For more options, visit https://groups.google.com/d/optout.