how to pass db node info to tomcat node?
I have installed a puppet master on one machine
I have installed puppet agents on two machines.
I would like to install tomcat module on one puppet agent machine and install mysql/postgresql on another puppet agent machine.
But, at the time installing tomcat module, i would like to pass mysql host/ip details to tomcat module so that when tomcat module is applied on the machine, the webapp can connect to mysql/postgresql machine with no manual changes.
How do we do that? I know it can be done by facter. But, documentation does not provide any indicators. Please give code sample