About | FAQ | Help
Ask Your Question
0

Help debugging file source issues - Could not evaluate: Could not retrieve information from

asked 2018-04-12 07:36:23 -0500

Paul Shore gravatar image

I am setting up a new 5.3 puppet server environment to replace a 3.8.7-1 existing server.

I have multiple environments, so I have copied one of them onto the new server and fixed some of the basic issues (module names having -, not enclosing perms in quotes etc.), but every file entries with a source is failing with the message:

Error: /Stage[main]/Aptsourcexenial/File[/tmp/sources.list]: Could not evaluate: Could not retrieve information from environment installation source(s) puppet:///modules/aptsourcexenial/files/etc/sources.list.xenial

The module file entry is as follows:

file { "/tmp/sources.list":
    owner => "root",
    group => "root",
    mode => "0644",
source => "puppet:///modules/aptsourcexenial/files/etc/sources.list.xenial",
}

The /etc/puppetlabs/code/environments/installation/environment.conf has an entry: modulepath = /etc/puppetlabs/code/environments/installation/modules

And the file /etc/puppetlabs/code/environments/installation/modules/aptsourcexenial/files/etc/sources.list.xenial exists and is readable by the puppet user.

Server is ubuntu 16.04 as is the client, puppet server packages are 5.5.0-1xenial/agent packages 5.5.0-1xenial

Default entries in /etc/puppetlabs/puppetserver/conf.d, do I need to add something to be able to access files from /etc/puppet/code/environments/installation?

Any help would be appreciated.

Thanks

Paul

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-04-13 05:48:22 -0500

Paul Shore gravatar image

If you take a look at the examples section of https://puppet.com/docs/puppet/5.0/mo...

You will see that in the files/ section the example puppet:/// URL doesn't have "/files/" within the path.

So if I change my code from: source => "puppet:///modules/aptsourcexenial/files/etc/sources.list.xenial", to source => "puppet:///modules/aptsourcexenial/etc/sources.list.xenial",

It works. The messages from puppet could be a lot clearer and warn if they find a "files" directory after the module name.

Paul

edit flag offensive delete link more

Comments

Please file a ticket to get that error message improved.

Henrik Lindberg gravatar imageHenrik Lindberg ( 2018-04-15 03:17:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-04-12 07:36:23 -0500

Seen: 48 times

Last updated: Apr 13