Ask Your Question

puppet file server path variable

asked 2013-01-15 08:25:47 -0600

jlwagner gravatar image

updated 2013-01-16 16:50:23 -0600

llowder gravatar image

I am having an issue trying to use the following filepath:

source => "puppet:///users/files/${userid}/id_rsa"

If I use absolute path it works and if I have a file in the root of /files it also works. It fails when a variable path is added. Any suggestions? ver. 3.0.2

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2013-01-15 14:03:31 -0600

ramindk gravatar image

If the path on disk is


then the source will be

source => "puppet:///users/${userid}/id_rsa"

/files/ is not needed.

edit flag offensive delete link more


Yeah, I should have caught that. Been kind of an off week for me. But it is working now for you?

llowder gravatar imagellowder ( 2013-01-15 14:34:05 -0600 )edit

answered 2013-01-15 10:09:28 -0600

llowder gravatar image

If you have the file located in modules/users/files/${userid}/id_rsa then

source => "puppet:///users/files/${userid}/id_rsa"

will work.

However, if the file is located in the root of the files directory, you need to use:

source => 'puppet:///users/files/id_rsa'

If you have the file located in the appropriate subdirectory, try adding:

notify {"userid is: ${userid}": }

which will then let you confirm that "userid" is what you expect it to be.

edit flag offensive delete link more

answered 2013-01-15 11:13:15 -0600

jlwagner gravatar image

Thanks for the reply however that is not the case.

File path = /usr/share/puppet/modules/users/files/jlwagner/id_rsa

Puppet directive = source => "puppet:///users/files/${userid}/id_rsa"

Verified = Notice: /Stage[main]/Users::Jlwagner/Notify[userid is: jlwagner]/message: defined 'message' as 'userid is: jlwagner'

Still no joy, any other suggestions?

edit flag offensive delete link more


Can you share the output of "puppet config print modulepath", specifically as the user you run the puppet master as (root or puppet)? Just in case your $modulepath is off ...(more)

llowder gravatar imagellowder ( 2013-01-15 12:58:18 -0600 )edit

Thanks for the followup. Here is the requested information: [root@lccns344 users]# puppet config print modulepath /etc/puppet/modules:/usr/share/puppet/modules Here is the error : Error 400 on ...(more)

jlwagner gravatar imagejlwagner ( 2013-01-15 14:01:29 -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


Asked: 2013-01-15 08:25:47 -0600

Seen: 1,915 times

Last updated: Jan 15 '13