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 that which class should be applied on which node. Is it possible to do?
I am using puppet enterprise, hiera, facter, puppetdb and mcollective.