From d3aeae8c42c1df22ab580ddae984707513f918d3 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Mon, 17 Dec 2018 16:23:25 +0100 Subject: [PATCH] Vagrant: syncronize resolf.conf and Tobiko files. Change-Id: Ib8cccb0add07248a19062db1889210a984ea0a47 --- Vagrantfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index bb19df289..99dd768ac 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -102,6 +102,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # View the documentation for the provider you are using for more # information on available options. + # Use the same DNS server as the host machine + config.vm.provision "file", source: "/etc/resolv.conf", + destination: "~/resolv.conf" + config.vm.provision "shell", privileged: false, + inline: "sudo mv ~/resolv.conf /etc/resolv.conf" + # Enable provisioning with a shell script. Additional provisioners such as # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # documentation for more information about their specific syntax and use. @@ -113,6 +119,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack fi + if ! [ -d '#{DEVSTACK_DEST_DIR}/tobiko' ]; then + sudo mkdir -p '#{DEVSTACK_DEST_DIR}/tobiko' + sudo mount --bind /vagrant '#{DEVSTACK_DEST_DIR}/tobiko' + fi + # Generate provision RC file to pass variables to provision script sudo echo ' export TOBIKO_SRC_DIR=#{TOBIKO_SRC_DIR}