Finding the current roaming operation from within a Vagrantfile?

I'm looking for a way to find the current "vagrant" subcommand (eg, "up", "provision") from within a Vagrantfile.

I know I can get ARGV (for example, getting command line arguments within a Vagrantfile ), but a simple search for "up" and "provide" in ARGV can accidentally get plugin subcommand arguments.

Is there a way to find out from within the Vagrantfile which the Vagrant team is going to execute?

The motivation is to avoid the time-consuming operations required to "submit" and "up", but redundant for other sub-teams (for example, getting information from AWS).

+3
vagrant vagrantfile


source to share


No one has answered this question yet

See similar questions:

eleven
getting command line arguments within Vagrantfile

or similar:

6
Vagrant Installing Anaconda Python?
4
Operation not allowed in SBT / Activate Activator inside Vagrant Synced Folder
2
vagrant: run a shell script in Virtualbox after loading Docker instances (wrong ordering)
2
Vagrant chef can't find folder
1
Evaluate the expression on the host machine and pass the results to the init shell script as an argument
1
Vagrant unable to find home / vagrant /hiera.yaml
0
Tramp. VM after provisioning
0
How to keep your vagrant configuration organized
0
How to get the path to Vagrantfile directory in Vagrantfile (not current working directory)
0
Getting information about Vagrant servers from the Vagrantfile runtime



All Articles
Loading...
X
Show
Funny
Dev
Pics