create variable from file
I am creating instances via google compute. the issue is I need to specific the IP in a config file. I have made it this far but am stuck.
I automatically create the external ip in a file ( /etc/ip) I need to reference that file to turn it into a variable to use in an ERB.
here is all I want to accomplish. I have a config file that is automatically generated. inside that config file it has externalIp =
I want that to be filled in with the value from /opt/ip currently I have my erb template file like this externalIp = <%= @ip %>
If I set the variable in the class $ip to 18.104.22.168 then in that conf file externalIp = 22.214.171.124
What I cant figure out now is how to set $ip = /opt/ip