Ask Your Question

Ways of setting global resource default

asked 2014-11-27 11:44:44 -0600

martin gravatar image


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

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

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

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

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


Asked: 2014-11-27 11:44:44 -0600

Seen: 227 times

Last updated: Dec 03 '14