Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

+++
++++Production 
+--------------server1-production
+--------------server2-production
++++Staging
+--------------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
add comment

1 Answer

up vote 1 down vote accepted

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

http://www.craigdunn.org/2012/05/239/

share|improve this answer
add comment

Your Answer

 
discard

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.