Ask Your Question
0

site.pp and environments

asked 2015-07-05 14:38:55 -0600

Yeayu gravatar image

updated 2015-07-12 04:45:21 -0600

Hello all,

I am using puppet environments across my infrastructure. This approach is working perfectly for me, but I am not sure whether I am using site.pp correctly or not, since I feel I am duplicating stuff.

In essence, I have a site.pp per each of the environments where I have defined filebucket, default node classes and what my puppet server is. Due to this info is the same for each of the environments (except the classes part), is it best practice to try to merge them together and use only one?

Apart from that, what info should be contained in this file?

# site.pp
filebucket { 'main':
server => 'puppet-server01.contoso.com',
path   => false,
}

# Make filebucket 'main' the default backup location for all File resources:
File { backup => 'main' }

node default {
# This is where you can declare classes for all nodes.
class { 'environment1_classes': }

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Show us the content of your site.pp files and it'll be easier to answer.

Alex Harvey gravatar imageAlex Harvey ( 2015-07-11 04:24:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-12 21:58:47 -0600

It looks like you're misunderstanding node classification and the purpose of the default node. Have a look at this page here.

edit flag offensive delete link more

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: 2015-07-05 14:38:55 -0600

Seen: 373 times

Last updated: Jul 12 '15