Ask Your Question
0

Learning puppet, how to use group variables?

asked 2014-07-17 23:23:56 -0600

gwinetworks gravatar image

I'm quite new to the puppet world, about 12 hours in, and I've gone through the quest guide and learning VM stuff.

What I am missing is how to apply a group variable in a manifest.

For example, I created a variable called mySetting in the web console on a node.
Then in a manifest I used content => "$::mySetting", When I do puppet apply test.pp, the file is created, but empty. Am I missing something?

edit retag flag offensive close merge delete

Comments

I assume you are missing brackets in the code it should look like content => "$(::mysetting)"

rahulrbl gravatar imagerahulrbl ( 2014-07-21 01:18:30 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-07-20 21:01:43 -0600

mapa3m gravatar image

I assume by "web interface" you mean Puppet Dashboard? Dashboard is not used when running "puppet apply" - that's a local manifest application, without using a master to retrieve the information from Dashboard and compile the catalog. Variables defined in Dashboard are only accessible when using a master-agent with ENC.

edit flag offensive delete link more
0

answered 2014-07-22 07:40:59 -0600

igalic gravatar image

I think we are assuming too much. @gwinetworks, What does the variable $mySetting contain?

edit flag offensive delete link more

Comments

the mySetting was defined in the puppet dashboard as "This is my setting"

gwinetworks gravatar imagegwinetworks ( 2014-07-25 11:40:21 -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

1 follower

Stats

Asked: 2014-07-17 23:23:56 -0600

Seen: 89 times

Last updated: Jul 22 '14