----- Original Message ----- > From: "Luke Kanies" <l...@puppetlabs.com> > To: puppet-dev@googlegroups.com > Sent: Thursday, June 28, 2012 4:42:13 PM > Subject: Re: [Puppet-dev] Export and collect data, not just resources. > > > >> On Jun 22, 2012, at 12:48 PM, Andrew Forgue wrote: >> >> >> On Wednesday, June 20, 2012 9:24:20 PM UTC-4, Ryan Bowlby wrote: >> >> We solved this problem using Volcane's registration system. It's > > What are the problems with this approach? > > > Are there functions you use beyond 'search_nodes'? > > > If you look at all of your search_nodes functions, are they similar > calls, or do you have a wide variety of types of calls?
the ones I wrote supports simple class and fact matchers and returns just a list of nodes. There is another function that retrieves facts for a nodes back as a hash It's functional ofcourse, I think its completely the wrong solution but it scratches the itch till we can do better. Find all the machines that wants to connect to me using ipsec: $clients = search_nodes({'classes' => 'ipsec::endpoint::monitor1'}) Create ipsec tunnels back to them: ipsec::endpoints_from_nodes{$clients: } And this is the define, it will take each node name and load facts then create a tunnel back: define ipsec::endpoints_from_nodes { $node = load_node($name) ipsec::endpoint{$node["fqdn"]: dest => $node["facts"]["ipaddress"] } } -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.