create multiple parameters in config file based on variable array
What I have is something like this
$ipnode1 = '220.127.116.11',
$ipnode2 = '18.104.22.168',
$ip_node3 = '22.214.171.124',
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.