diff --git a/CHANGELOG.md b/CHANGELOG.md index 2addb4ee7..cea0e02f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,6 +89,7 @@ BUG FIXES: network adapters. [GH-1886] - provisioners/ansible: Execute ansible with a cwd equal to the path where the Vagrantfile is. [GH-2051] + - provisioners/all: invalid config keys will be properly reported. [GH-2117] - provisioners/ansible: No longer report failure on every run. [GH-2007] - provisioners/ansible: Properly handle extra vars with spaces. [GH-1984] - provisioners/chef: Formatter option works properly. [GH-2058] diff --git a/plugins/provisioners/ansible/config.rb b/plugins/provisioners/ansible/config.rb index df265698b..fb162ef27 100644 --- a/plugins/provisioners/ansible/config.rb +++ b/plugins/provisioners/ansible/config.rb @@ -47,7 +47,7 @@ module VagrantPlugins end def validate(machine) - errors = [] + errors = _detected_errors # Validate that a playbook path was provided if !playbook diff --git a/plugins/provisioners/cfengine/config.rb b/plugins/provisioners/cfengine/config.rb index 5d3cd3f02..73f2f95f1 100644 --- a/plugins/provisioners/cfengine/config.rb +++ b/plugins/provisioners/cfengine/config.rb @@ -90,7 +90,7 @@ module VagrantPlugins end def validate(machine) - errors = [] + errors = _detected_errors valid_modes = [:bootstrap, :single_run] errors << I18n.t("vagrant.cfengine_config.invalid_mode") if !valid_modes.include?(@mode) diff --git a/plugins/provisioners/chef/config/base.rb b/plugins/provisioners/chef/config/base.rb index aaf69632c..514353813 100644 --- a/plugins/provisioners/chef/config/base.rb +++ b/plugins/provisioners/chef/config/base.rb @@ -87,7 +87,7 @@ module VagrantPlugins # it returns an array of errors that should be merged into some # other error accumulator. def validate_base(machine) - errors = [] + errors = _detected_errors if @custom_config_path expanded = File.expand_path(@custom_config_path, machine.env.root_path) diff --git a/plugins/provisioners/file/config.rb b/plugins/provisioners/file/config.rb index f7eb6d3ec..a78a19ba8 100644 --- a/plugins/provisioners/file/config.rb +++ b/plugins/provisioners/file/config.rb @@ -7,7 +7,7 @@ module VagrantPlugins attr_accessor :destination def validate(machine) - errors = [] + errors = _detected_errors if !source errors << I18n.t("vagrant.provisioners.file.no_source_file") end diff --git a/plugins/provisioners/puppet/config/puppet.rb b/plugins/provisioners/puppet/config/puppet.rb index e82774b42..46b3c9f0f 100644 --- a/plugins/provisioners/puppet/config/puppet.rb +++ b/plugins/provisioners/puppet/config/puppet.rb @@ -59,7 +59,7 @@ module VagrantPlugins end def validate(machine) - errors = [] + errors = _detected_errors # Calculate the manifests and module paths based on env this_expanded_manifests_path = expanded_manifests_path(machine.env.root_path) diff --git a/plugins/provisioners/salt/config.rb b/plugins/provisioners/salt/config.rb index c8e6cf929..77fe6c121 100644 --- a/plugins/provisioners/salt/config.rb +++ b/plugins/provisioners/salt/config.rb @@ -79,7 +79,7 @@ module VagrantPlugins end def validate(machine) - errors = [] + errors = _detected_errors if @minion_key || @minion_pub if !@minion_key || !@minion_pub errors << @minion_pub