Ask Your Question
0

Puppet — Applying puppet classes

asked 2014-02-09 08:34:36 -0600

skit gravatar image

I have a node 1 on which my application is going to be deployed using puppet. I have created a hiera file (node1_application.yaml) which states all the server details that this application is going to use such as

ldap_server = node2

mq_server = node3

Is there any way that in node.pp , I only give node1 information which stats which class to be applied on node 1. Then this class reads my hiera file and see that ldap server is on node 2 so ldap module should be applied on node 2.

It should be dynamically decided using my hiera file ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2014-02-10 02:46:22 -0600

doc75 gravatar image

If I understood well your question, you just need to add hiera_include('classes') in your site.pp. Then you have to define classes as an array of classes name you assign to this node in your yaml file

cf.: http://docs.puppetlabs.com/hiera/1/puppet.html#assigning-classes-to-nodes-with-hiera-hierainclude

Hope this hemps.

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-02-09 08:34:36 -0600

Seen: 58 times

Last updated: Feb 10 '14