Warm tip: This article is reproduced from serverfault.com, please click

how to check if vagrant machine is running through the shell

发布于 2020-11-28 17:27:23

I am new to Vagrant and almost new to Linux. I am practicing to learn about vagrant and so I have a vagrantfile which starts 3 machines, the first machine executes a shell script as provision method but, some the last 2 commands need to be executed just when the other 2 machines are up, so it will need to skip these commands and go back to then when the other 2 machines are up... I have gone through Vagrant documentation and I have not been able to find if this is possible to do. Is there any way to do this?

Questioner
Jesus Fernandez
Viewed
0
Ricardo Lourenço 2021-03-22 03:21:08

Maybe is there a more "robust" solution, but im using:

vagrant status | grep "is running"