intend to set a more meaningful hostname than the usual ip* and dom* names
assigned by Amazon.
My source csv file is setup as:
publicdns,name
ec2-184-73.compute-1.amazonaws.com,server-1
ec2-23-20.compute-2.amazonaws.com,server-2
In my hostname/init.pp file, I wanted to use *$instancename =
extlookup($ec2_public_hostname, 'undefined',$csv)* to return the second
value in the row, but it instead returns the default value, i.e. it didn't
find it.
When I use* **$instancename = extlookup('publicdns', 'undefined',$csv)*, it
returns the concatenated "ec2-184-73.compute-1.amazonaws.com
ec2-23-20.compute-2.amazonaws.com". Similarly, when I use *$instancename =
extlookup('name', 'undefined',$csv)*, it returns the value
"server-1server-2".
This isn't consistent with how I understand extlookup to work, since I
thought it is supposed to read across rows, not columns. How should I
identify and properly extract the second field of a given row?
--
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/-/GhooJ8X-b38J.
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.