Hi, I have a YAML file constructed like this:
servers:
server1:
host: 1.1.1.1
node: 1
server2:
host: 1.1.1.2
node: 2
I have an erb template that needs the node id where the it address belongs to
the machine it is running on. Is there a way in ruby to select
Sounds like you want @servers[@hostname]['node'] ? If you want to match on the
ip address that sounds like you'd have to loop over it or build an ip=hostname
mapping.
http://docs.puppetlabs.com/guides/templating.html#referencing-variables
On Thu, May 29, 2014 at 08:08:53AM -0700, Christopher