From 9d8c85e9663db50a389419f82b81262a755fd3d5 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 23 Oct 2014 18:26:51 -0700 Subject: [PATCH] core: provision-with works with provisioner IDs [GH-2850] --- lib/vagrant/action/builtin/mixin_provisioners.rb | 1 + lib/vagrant/action/builtin/provision.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/action/builtin/mixin_provisioners.rb b/lib/vagrant/action/builtin/mixin_provisioners.rb index 9ee465aa5..fb66f94ff 100644 --- a/lib/vagrant/action/builtin/mixin_provisioners.rb +++ b/lib/vagrant/action/builtin/mixin_provisioners.rb @@ -27,6 +27,7 @@ module Vagrant # Build up the options options = { + id: provisioner.id, run: provisioner.run, } diff --git a/lib/vagrant/action/builtin/provision.rb b/lib/vagrant/action/builtin/provision.rb index 0795a2ddc..3152df24f 100644 --- a/lib/vagrant/action/builtin/provision.rb +++ b/lib/vagrant/action/builtin/provision.rb @@ -103,7 +103,8 @@ module Vagrant provisioner_instances(env).each do |p, options| type_name = type_map[p] next if env[:provision_types] && \ - !env[:provision_types].include?(type_name) + !env[:provision_types].include?(type_name) && \ + !env[:provision_types].include?(options[:id]) && # Don't run if sentinel is around and we're not always running next if !provision_enabled && options[:run] != :always