Fix chef validations with new blank run lists
This commit is contained in:
parent
63292fba96
commit
e83260662e
|
@ -3,6 +3,10 @@
|
||||||
- Network interfaces are now up/down in distinct commands instead of just
|
- Network interfaces are now up/down in distinct commands instead of just
|
||||||
restarting "networking." [GH-192]
|
restarting "networking." [GH-192]
|
||||||
- Add missing translation for chef binary missing. [GH-203]
|
- Add missing translation for chef binary missing. [GH-203]
|
||||||
|
- Fix default settings for Opscode platform and comments. [GH-213]
|
||||||
|
- Blank client name for chef server now uses FQDN by default, instead of "client" [GH-214]
|
||||||
|
- Run list can now be nil, which will cause it to sync with chef server (when
|
||||||
|
chef server is enabled). [GH-214]
|
||||||
|
|
||||||
## 0.6.7 (November 3, 2010)
|
## 0.6.7 (November 3, 2010)
|
||||||
|
|
||||||
|
|
|
@ -136,9 +136,13 @@ module Vagrant
|
||||||
errors.add(I18n.t("vagrant.config.chef.validation_key_path")) if !validation_key_path
|
errors.add(I18n.t("vagrant.config.chef.validation_key_path")) if !validation_key_path
|
||||||
end
|
end
|
||||||
|
|
||||||
if [:chef_solo, :chef_server].include?(top.vm.provisioner)
|
if top.vm.provisioner == :chef_solo
|
||||||
# Validations shared by both chef solo and server
|
# On chef solo, a run list MUST be specified
|
||||||
errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if !run_list || run_list.empty?
|
errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if !json[:run_list] || run_list.empty?
|
||||||
|
elsif top.vm.provisioner == :chef_server
|
||||||
|
# On chef server, the run list is allowed to be nil, which causes it
|
||||||
|
# to sync with the chef server.
|
||||||
|
errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if json[:run_list] && run_list.empty?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue