Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a environment that has several environments like production staging etc . Now what i want is that I can re-use the nodes.pp written for one environment for the other.

Example - Suppose I have 2 environment production and staging. Each contains a web server. Now if I already have nodes.pp (or some other manifests ) written for a node in a environment, how to use hiera-puppet to generate this nodes.pp according to the environment.

+--------------Staging-web1  (Needs the same classes as server1-production)
+--------------Staging-web2  (Needs the same classes as server2-production)
share|improve this question
The accepted practice is to use standard puppet manifests and have environment specific data in hiera. See docs.puppetlabs.com/hiera/1/complete_example.html – Patrick Aug 25 '13 at 0:11
up vote 1 down vote accepted

Take a look at this link. It may be the paradigm you are looking for.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.