Vagrant: syncronize resolf.conf and Tobiko files.

Change-Id: Ib8cccb0add07248a19062db1889210a984ea0a47
This commit is contained in:
Federico Ressi 2018-12-17 16:23:25 +01:00
parent de45aec61d
commit d3aeae8c42
1 changed files with 11 additions and 0 deletions

11
Vagrantfile vendored
View File

@ -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}