so we define that file would be exported from node1 like:

@@file { "etc/mynode.txt:":
   content => "${mycontent}"
}

and on the node2

File <| |>> ?? I want only the info from node1 not from all nodes that
means I have to group the nodes for the specific action?
who it works here? I am pretty new in puppet but I didn't get it from the
documentation

--Nikos

On Wed, Jul 25, 2012 at 1:12 PM, jcbollinger <[email protected]>wrote:

>
>
> On Wednesday, July 25, 2012 12:05:50 PM UTC-5, Nikolaos Hatzopoulos wrote:
>>
>> So let's say you have two nodes
>> node1 and node2
>>
>> node1 has a text file with one line saying in /etc/mynode.txt:
>>
>> node1
>>
>> how you receive this information and pass it to node2 using puppet?
>>
>
> The standard means for nodes to publish information to the master is via
> facts, and the standard means for the master to use information belonging
> to one node to configure another node is exporting and collecting
> resources.  In principle, therefore, you create a custom fact by which
> node2 (and every other node) publishes the contents of /etc/mynode.txt to
> the master, and the master creates an exported resource such as this:
>
> @@file { "/etc/nodes/${hostname}-mynode.txt":
>   # using your custom fact:
>   content => "${mynode_txt_content}"
> }
>
> Among the classes assigned to node2, at least one would collect some or
> all of those files:
>
> # This actually collects *all* exported files:
> File<<| |>>
>
> Node2 would then get copies of all nodes' /etc/mynode.txt files as
> /etc/nodes/<nodename>-mynodes.txt.
>
>
> John
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/XlGEYr776ekJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to