provisioners/chef: validate environments path [GH-2381]
This commit is contained in:
parent
9a1001cbf5
commit
798432febe
|
@ -78,6 +78,8 @@ BUG FIXES:
|
||||||
failure during `up` from suspended. [GH-2479]
|
failure during `up` from suspended. [GH-2479]
|
||||||
- provisioners/chef: Chef client encrypted data bag secrets are now
|
- provisioners/chef: Chef client encrypted data bag secrets are now
|
||||||
uploaded to the provisioning path to avoid perm issues. [GH-1246]
|
uploaded to the provisioning path to avoid perm issues. [GH-1246]
|
||||||
|
- provisioners/chef: Verify environment paths exist in config
|
||||||
|
validation step. [GH-2381]
|
||||||
- provisioners/salt: Bootstrap on FreeBSD systems work. [GH-2525]
|
- provisioners/salt: Bootstrap on FreeBSD systems work. [GH-2525]
|
||||||
|
|
||||||
## 1.3.5 (October 15, 2013)
|
## 1.3.5 (October 15, 2013)
|
||||||
|
|
|
@ -70,6 +70,16 @@ module VagrantPlugins
|
||||||
errors << I18n.t("vagrant.config.chef.environment_path_required") if \
|
errors << I18n.t("vagrant.config.chef.environment_path_required") if \
|
||||||
environment && environments_path.empty?
|
environment && environments_path.empty?
|
||||||
{ "chef solo provisioner" => errors }
|
{ "chef solo provisioner" => errors }
|
||||||
|
|
||||||
|
environments_path.each do |type, raw_path|
|
||||||
|
next if type != :host
|
||||||
|
|
||||||
|
path = Pathname.new(raw_path).expand_path(machine.env.root_path)
|
||||||
|
if !path.directory?j
|
||||||
|
errors << I18n.t("vagrant.config.chef.environment_path_missing",
|
||||||
|
path: raw_path.to_s)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -699,7 +699,10 @@ en:
|
||||||
error_empty: "`%{field}` must be not be empty."
|
error_empty: "`%{field}` must be not be empty."
|
||||||
chef:
|
chef:
|
||||||
cookbooks_path_empty: "Must specify a cookbooks path for chef solo."
|
cookbooks_path_empty: "Must specify a cookbooks path for chef solo."
|
||||||
environment_path_required: "When 'environment' is specified, you must provide 'environments_path'."
|
environment_path_missing: |-
|
||||||
|
Environment path not found: %{path}
|
||||||
|
environment_path_required: |-
|
||||||
|
When 'environment' is specified, you must provide 'environments_path'.
|
||||||
cookbooks_path_missing: |-
|
cookbooks_path_missing: |-
|
||||||
Cookbook path doesn't exist: %{path}
|
Cookbook path doesn't exist: %{path}
|
||||||
custom_config_path_missing: |-
|
custom_config_path_missing: |-
|
||||||
|
|
Loading…
Reference in New Issue