H. Wade Minter
2012-Feb-24 15:20 UTC
[Puppet Users] Looping through all registered client nodes?
I''m looking to see if there''s a way that I can set up a class on my puppetmaster node to loop through all of the defined nodes and add a hosts entry for the internal IP. I think I''m good with the actual adding of the entry, but I''m curious as to how to get access to all defined hosts and loop through their facts. Basically I want to manage /etc/hosts on the puppetmaster using information about all of the registered nodes. Any pointers? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Paul Tötterman
2012-Feb-27 08:55 UTC
[Puppet Users] Re: Looping through all registered client nodes?
Hi,> I''m looking to see if there''s a way that I can set up a class on my > puppetmaster node to loop through all of the defined nodes and add a > hosts entry for the internal IP. I think I''m good with the actual > adding of the entry, but I''m curious as to how to get access to all > defined hosts and loop through their facts.Not really defined nodes, but it should be possible to use exported resources to export the ip address of each node and then collect them. http://docs.puppetlabs.com/guides/exported_resources.html Cheers, Paul -- 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/-/yfczszBhR40J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.