obteniendo los argumentos de la línea de comando vagrant dentro del Vagrantfile
Tengo la siguiente configuración que solo tiene sentido para el comando vagrant up:
config.vm.provider :virtualbox do |vb|
vb.gui = false
if ENV["VB_GUI"] == "true" then vb.gui = true
else
puts("[info] VB_GUI environment variable not set so running headless")
end
end
¿Es posible enlazar con la API errante para recuperar el comando que se está ejecutando actualmente? P.ej.
config.vm.provider :virtualbox do |vb|
vb.gui = false
if VAGRANT_API.command == "up" # how can I do this?
if ENV["VB_GUI"] == "true" then vb.gui = true
else
puts("[info] VB_GUI environment variable not set so running headless")
end
end
end