Ask Your Question

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 => '',
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


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

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


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

Seen: 438 times

Last updated: Jul 12 '15