Hi Team

42 views
Skip to first unread message

Jegadeesh Kumar

unread,
Nov 26, 2014, 1:43:31 AM11/26/14
to puppet...@googlegroups.com
I am a new bee in puppet world.



I wrote one class to copy a file from puppet master to puppet agent. i puppet client says following error.

Error: /Stage[main]/Motd/File[motd]: Could not evaluate: Could not retrieve file metadata for puppet://modules/files/etc/motd: getaddrinfo: Temporary failure in name resolution

Puppet class is

root@puppet classes]# cat motd.pp
class motd{
        file {'motd':
                path   =>"/etc/motd",
                ensure => "file",
                owner  => "root",
                group  => "root",
                mode  => "644",
                #content => "Hello this is jegadeesh test",
                source => "puppet://modules/files/etc/motd"
                }
        }


keep the desired files under /etc/puppet/modules/files/etc

Please help me to short out the issue.

Thanks,
Jegadeesh

Denmat

unread,
Nov 26, 2014, 5:20:41 AM11/26/14
to puppet...@googlegroups.com
Hi,

You need:
puppet:///modules/...

for details.
Den

On 26 Nov 2014, at 17:43, Jegadeesh Kumar <jega...@gmail.com> wrote:

                source => "puppet://modules/files/etc/motd"

Tony Thayer

unread,
Dec 2, 2014, 1:49:05 PM12/2/14
to puppet...@googlegroups.com
In addition to needing to use three '/'s in your URI as Den mentioned, you would need to change up your folder path. Modules under /etc/puppet/modules all have their own structure i.e. /etc/puppet/modules/modulename/{files,manifests,templates,tests}. When structuring your URI you need to keep in mind that the 'files' folder is invisible or silent. If you have a module named 'files', then you would need to put your motd file in /etc/puppet/modules/files/files/etc/.

- Tony
Reply all
Reply to author
Forward
0 new messages