Vagrantfile: Add workaround for empty /etc/hosts 13/41613/2
authorMarkos Chandras <mchandras@suse.de>
Mon, 4 Sep 2017 10:33:50 +0000 (11:33 +0100)
committerMarkos Chandras <mchandras@suse.de>
Sat, 16 Sep 2017 09:30:55 +0000 (10:30 +0100)
Due to a bug in Yast2, /etc/hosts may be empty in Vagrant images so
add a workaround for it.

Change-Id: I1da9204a07f33008f9d5f1ec9ce976116e9d7a4c
Signed-off-by: Markos Chandras <mchandras@suse.de>
Vagrantfile

index 78aa8d7..2a82902 100644 (file)
@@ -140,6 +140,8 @@ Vagrant.configure(2) do |config|
         export VM_DOMAIN_TYPE=qemu
         export PATH=$PATH:$HOME/.local/bin
         export OPNFV_RELENG_DEV_PATH=/vagrant
+        # workaround for https://github.com/openSUSE/vagrant/pull/22
+        sudo bash -c 'echo "127.0.0.1 localhost" >> /etc/hosts'
         [[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa
         cd xci && ./xci-deploy.sh
       SHELL