Commit de543895 authored by Volker Hilsheimer's avatar Volker Hilsheimer

Add 'describe' feature to print yaml for a machine

Includes all the interpretations and implicit configs etc.
Useful for debugging.
parent d14a5e8e
......@@ -295,6 +295,11 @@ Vagrant.configure("2") do |config|
end
end
if ARGV[0] == "describe"
puts machine.to_yaml
next
end
# make powershell the default ssh shell on Windows at the end, as some provisioners rely on cmd
if box.vm.guest == :windows
box.vm.provision "powershell_default",
......
......@@ -38,6 +38,10 @@ if [[ $# > 0 ]]; then
minicoin_command=minicoin_info
min_args=0
shift
elif [ $1 == "describe" ]; then
minicoin_command=minicoin_describe
min_args=0
shift
elif [ $1 == "jobs" ]; then
minicoin_command=minicoin_jobs
min_args=0
......@@ -93,7 +97,11 @@ IFS='
echo
echo " List the available machines, without querying them for their status."
echo
echo " ls machine1 machine2 ... [-- [args]]"
echo " describe [machine1 [machine2]]"
echo
echo " Prints the YAML version for the specificed machines"
echo
echo " ls machine1 [machine2] ... [-- [args]]"
echo
echo " Show the directory contents of each machine. 'args' will be passed to the"
echo " respective command, ie 'ls' on mac and Linux guests, and the 'dir' command"
......@@ -162,6 +170,12 @@ function minicoin_info()
return $?
}
function minicoin_describe()
{
run ruby lib/minicoin.rb describe "${machines[@]}"
return $?
}
function minicoin_jobs()
{
echo "Available jobs are:"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment