Ask Your Question
0

Ways of setting global resource default

asked 2014-11-27 11:44:44 -0500

martin gravatar image

Hi,

I am currently setting some global resource defaults (like exec path) with 'import' in site.pp. Since 'import' is not recommended anymore I am wondering how can I use set resource defaults globally apart from putting them directly into site.pp.

Cheers, Martin

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-11-27 22:39:40 -0500

llowder gravatar image

You can still put them into site.pp - just don't put them inside a node definition and they will apply to everything without needing import.

Given that resource defaults only apply to the given scope they are declared in, this is the only good way to get them into top scope since at present an ENC cannot include individual resources, just classes and their parameters.

edit flag offensive delete link more
0

answered 2014-12-03 16:38:58 -0500

WhatsARanjit gravatar image

Echo'ing the other answer, it's worth putting something like this in your site.pp

Exec { path => $::path }
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: 2014-11-27 11:44:44 -0500

Seen: 178 times

Last updated: Dec 03 '14