Ask Your Question
2

Why can't the puppetmaster find this file?

asked 2012-11-13 12:38:17 -0600

pdxmph gravatar image

updated 2012-12-17 17:58:35 -0600

Dawn gravatar image

Here's a resource from my manifest:

file { "/etc/apache2/sites-available/000_smt_sandbox":  
  owner  => "root",  
  group  => "root",  
  mode   => "0750",  
  source => "puppet:///modules/smt_sandbox/files/000_smt_sandbox",  
  require => Package["apache2"],  
}

For some reason, every time my agent connects, it fails on this resource with the following message:

Error: /Stage[main]/Smt_sandbox/File[/etc/apache2/sites-available/000_smt_sandbox]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/smt_sandbox/files/000_smt_sandbox

I've checked and doublechecked that the file is there and the permissions look ok—I even copied and pasted the path straight into the resource—but the agent's ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
12

answered 2012-11-15 17:53:27 -0600

eric0 gravatar image

The Puppet fileserver takes those puppet:/// url and inserts an implicit files directory[ so you don't need to specify that in the url. Very much like a normal old-school webserver takes http://server/~username and looks in /home/username/public_html, a URL like

puppet:///modules/smt_sandbox/000_smt_sandbox

gets translated on the filesystem into

/etc/puppet/modules/smt_sandbox/files/000_smt_sandbox

so having the extra files path element in your URL is causing the problem.

edit flag offensive delete link more

Comments

extending the explanation: source => "puppet:///modules/ssh/sshd_config", means that your sshd_config should be found inside modules/ssh/files/

Alex Moreno gravatar imageAlex Moreno ( 2014-01-01 11:46:07 -0600 )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: 2012-11-13 12:38:17 -0600

Seen: 18,704 times

Last updated: Nov 15 '12