I should add that I am using a masterless puppet environment, so a global list of all nodes is not available.
Some Googling suggested the use of multiple files that are concatenated, but I think that's a messy kluge, and would like to avoid doing that. On Wednesday, April 18, 2012 12:38:08 PM UTC+1, Robert Rothenberg wrote: > > I have an internal web site that can only be accessed from other servers. > > It seems to me that I should pass an array of the addresses to the class > that instantiates the template for the Apache configuration. That seems > easy. > > The hard part is getting every node to "register" itself so that it's IP > address is added to the array. > > I imagine using virtual resources, e.g. something like > > define website::client { > $website::clients += [ $title ] > } > > and in each node definition (specifically outside the node { ... } > declaration) > > @website::client{ $ip_address_of_node: } > > and somewhere else > > Website::Client <| |> > > I would expect that for every node, it's ip address would be added to the > array. But this doesn't seem to work. In the "website" class, the $clients > array is never changed from what it is initialized to. > > What are the best practices for doing something like this? > > Thanks, > Robert > > > -- 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/-/tP9dLmF-A74J. 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.