753e7f0ed7
this patch improves vagrant functionality by taking advantage of the non-root shell provisioner; namely via the privileged: false flag previously the vagrant dev environments were lacking utility in out of the box experience Change-Id: Iaabe918c7eee5ac18d1ffd393f59fda568088eb5
28 lines
1002 B
Plaintext
28 lines
1002 B
Plaintext
Vagrant.configure("2") do |config|
|
|
config.vm.box = "ubuntu/focal64"
|
|
config.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "2048"
|
|
end
|
|
config.vm.provision "shell", inline: <<-ROOTSHELL
|
|
echo "export TERM=xterm">>/root/.bashrc
|
|
apt-get -y update
|
|
apt-get -y upgrade
|
|
apt-get -y install ansible git python3-pip vim
|
|
mkdir -p /etc/ansible
|
|
echo "localhost ansible_connection=local" >> /etc/ansible/hosts
|
|
ROOTSHELL
|
|
config.vm.provision "shell", privileged: false, inline: <<-NONROOTSHELL
|
|
echo "export TERM=xterm">>/home/vagrant/.bashrc
|
|
git clone https://opendev.org/openstack/validations-libs vl-dev
|
|
pushd vl-dev
|
|
sudo python3 -m pip install . -r requirements.txt
|
|
popd
|
|
git clone https://opendev.org/openstack/validations-common vc-dev
|
|
pushd vc-dev
|
|
sudo python3 -m pip install . -r requirements.txt
|
|
popd
|
|
sudo ln -s /usr/local/share/validations-common /usr/share/validations-common
|
|
sudo mkdir -p /var/log/validations
|
|
NONROOTSHELL
|
|
end
|