Ask Your Question
1

puppet file server path variable

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

jlwagner gravatar image

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

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
2

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

ramindk gravatar image

If the path on disk is

/usr/share/puppet/modules/users/files/jlwagner/id_rsa

then the source will be

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

/files/ is not needed.

edit flag offensive delete link more

Comments

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 -0500 )edit
0

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

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
0

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

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

Comments

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 -0500 )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 -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: 2013-01-15 08:25:47 -0500

Seen: 1,389 times

Last updated: Jan 15 '13