From 6ea8dc8e2028ac7520b0e5671f48ef5c486a4188 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 23 Oct 2014 18:47:03 -0700 Subject: [PATCH] core: cleaner output of what provisioner is running if named --- lib/vagrant/action/builtin/provision.rb | 7 ++++++- plugins/kernel_v2/config/vm.rb | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/action/builtin/provision.rb b/lib/vagrant/action/builtin/provision.rb index 44ace395a..2163a2c6a 100644 --- a/lib/vagrant/action/builtin/provision.rb +++ b/lib/vagrant/action/builtin/provision.rb @@ -109,9 +109,14 @@ module Vagrant # Don't run if sentinel is around and we're not always running next if !provision_enabled && options[:run] != :always + name = type_name + if options[:name] + name = "#{options[:name]} (#{type_name})" + end + env[:ui].info(I18n.t( "vagrant.actions.vm.provision.beginning", - provisioner: type_name)) + provisioner: name)) env[:hook].call(:provisioner_run, env.merge( callable: method(:run_provisioner), diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index 5082f9db5..da2440c52 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -296,6 +296,7 @@ module VagrantPlugins prov = nil if name + name = name.to_sym prov = @provisioners.find { |p| p.name == name } end