Shashank,
The templates are compiled on the master but can incorporate data sent to it from several sources, such as built-in facts, custom facts and exported resources. Copying files from node to master isn't possible in the manner that you want.
I suppose in this case setting a custom fact is the easiest solution. You can create a custom fact in various ways. They can be simple hardcoded files on the node, or run a simple or complex program on the node to determine the desired value. In your case a simple script that reads a file on the agent node and outputs a fact would be easy. Check out the following docs for info and examples:
You could also look at Exported Resources (
http://docs.puppetlabs.com/guides/exported_resources.html) which will 'share' actual Puppet resources between nodes. Kind of hard to explain, so check the Nagios example in the doc.
Hope this helps,
Martijn
Op woensdag 9 juli 2014 09:30:31 UTC+2 schreef shashank sinha: