From a9532a8cf108d8e50b29d90edea883865aabdecd Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Fri, 24 Mar 2023 14:43:43 -0500 Subject: [PATCH] Wait to verify DNS for EL-based bootstrap --- Vagrantfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index eb7e242..4e542ce 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -64,6 +64,12 @@ EOF minion03.vm.hostname = "minion03" minion03.vm.network "private_network", ip: "192.168.100.123" minion03.vm.provision "shell", inline: <<-SHELL + echo -n "> Waiting for network..." + while ! host bootstrap.saltproject.io >/dev/null; do + echo -n "." + sleep 1 + done + echo "Proceeding!" curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io sh bootstrap-salt.sh -A 192.168.100.120 || sh bootstrap-salt.sh -A 192.168.100.120 cat << EOF > /etc/salt/minion.d/grains.conf @@ -79,7 +85,12 @@ EOF minion04.vm.hostname = "minion04" minion04.vm.network "private_network", ip: "192.168.100.124" minion04.vm.provision "shell", inline: <<-SHELL - yum install -y + echo -n "> Waiting for network..." + while ! host bootstrap.saltproject.io >/dev/null; do + echo -n "." + sleep 1 + done + echo "Proceeding!" curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io sh bootstrap-salt.sh -A 192.168.100.120 cat << EOF > /etc/salt/minion.d/grains.conf