create multiple parameters in config file based on variable array
What I have is something like this
$ipnode1 = '18.104.22.168',
$ipnode2 = '22.214.171.124',
$ip_node3 = '126.96.36.199',
servers="<%= @ipnode1 %>,<%= @ipnode2 %>,<%= @ip_node3 %>"
What I want is to create a dynamic array which would sometimes have 2,3,5,9 or any number of values. Based on this array I want to have values in my config file servers parameter.
I found the solution to above, but I am looking for another one
In this case, requirement is to have a standard port number next to ip such as
What's the best way to do this without user having to type it every time next to IP in the array.