Add local hostname resolution to Vagrantfile
Makes running agents in vagrant without using `-dev` work.
This commit is contained in:
parent
a616e9d970
commit
9154f8a8ce
|
@ -64,6 +64,9 @@ bash scripts/install_rkt_vagrant.sh
|
|||
bash scripts/install_consul.sh
|
||||
bash scripts/install_vault.sh
|
||||
|
||||
# Set hostname's IP to made advertisement Just Work
|
||||
sudo sed -i -e "s/.*nomad.*/$(ip route get 1 | awk '{print $NF;exit}') nomad/" /etc/hosts
|
||||
|
||||
# CD into the nomad working directory when we login to the VM
|
||||
grep "cd /opt/gopath/src/github.com/hashicorp/nomad" ~/.profile || echo "cd /opt/gopath/src/github.com/hashicorp/nomad" >> ~/.profile
|
||||
SCRIPT
|
||||
|
|
Loading…
Reference in New Issue