Hi Martijn,

Thanks for the suggestion.

Just now I have implemented the custom facts as you have suggested and its 
exactly meets the requirement.

Thanks
Shashank


On Wednesday, July 9, 2014 1:49:38 PM UTC+5:30, Martijn wrote:
>
> 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:
>
>    - http://docs.puppetlabs.com/facter/2.0/custom_facts.html
>    - http://docs.puppetlabs.com/facter/2.0/fact_overview.html
>    
> 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:
>>
>> Hi,
>>
>> I have written a code on template to open & read file i.e passwd but it 
>> reads the file from the puppet server (Master-node) rather I want to read 
>> the file of each agent-nodes.
>>
>> Is it possible to read files from the agent node or to copy the files 
>> from agent to master?
>>
>> Thanks
>> Shashank
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f57d54f1-5ce2-40be-aa1d-e86508abc64c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to