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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.