I have been developing an automated deployment using Capistrano and using Vagrant as my test virtual server.
The thing is, I need the IP of Vagrant to \"ssh
ssh
I needed to know this to tell a user what to add to their host machine's host file. This works for me inside vagrant using just bash:
external_ip=$(cat /vagrant/config.yml | grep vagrant_ip | cut -d' ' -f2 | xargs) echo -e "# Add this line to your host file:\n${external_ip} host.vagrant.vm"