Only restart network once

One restart of the network restart is needed to get Avahi DNS resolution
to work, however restarts on subsequent --refresh runs are wasting time.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-06-08 14:55:26 +02:00
parent ce832d038e
commit f7aec1c867
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -14,7 +14,11 @@ Vagrant.configure("2") do |config|
config.vm.box = ENV['SCULLERY_BOX_NAME']
config.vm.box_url = ENV['SCULLERY_BOX_IMAGE']
config.vm.provision "shell", inline: <<-SHELL
systemctl restart network
if [ ! -f '/var/adm/scullery.configured' ]
then
systemctl restart network
touch /var/adm/scullery.configured
fi
SHELL
if ENV['SCULLERY_MASTERS']
ENV['SCULLERY_MASTERS'].split(',').each do |vmname|