diff --git a/lib/vagrant/action/builtin/mixin_provisioners.rb b/lib/vagrant/action/builtin/mixin_provisioners.rb index af7c3ddcb..d3b0d20ef 100644 --- a/lib/vagrant/action/builtin/mixin_provisioners.rb +++ b/lib/vagrant/action/builtin/mixin_provisioners.rb @@ -55,6 +55,12 @@ module Vagrant # extract root provisioners root_provs = pvs.map { |p,o| [p,o] if o[:before].nil? && o[:after].nil? }.reject(&:nil?) + + if root_provs.size == pvs.size + # no dependencies found + return pvs + end + # extract dependency provisioners dep_provs = pvs.map { |p,o| [p,o] if (!o[:before].nil? && !o[:before].is_a?(Symbol)) || (!o[:after].nil? && !o[:after].is_a?(Symbol)) }.reject(&:nil?) # extract each provisioners @@ -62,11 +68,6 @@ module Vagrant # extract all provisioners all_provs = pvs.map { |p,o| [p,o] if o[:before] == :all || o[:after] == :all }.reject(&:nil?) - if root_provs.size == pvs.size - # no dependencies found - return pvs - end - # TODO: Log here, that provisioner order is being changed # insert provisioners in order