provisioners/chef: error if knife not found and auto-deleting
This commit is contained in:
parent
0227dd26b1
commit
1ac3fb39fc
|
@ -1,5 +1,7 @@
|
|||
require File.expand_path("../base", __FILE__)
|
||||
|
||||
require "vagrant/util/which"
|
||||
|
||||
module VagrantPlugins
|
||||
module Chef
|
||||
module Config
|
||||
|
@ -50,6 +52,12 @@ module VagrantPlugins
|
|||
errors << I18n.t("vagrant.config.chef.validation_key_path") if \
|
||||
!validation_key_path
|
||||
|
||||
if delete_client || delete_node
|
||||
if !Vagrant::Util::Which.which("knife")
|
||||
errors << I18n.t("vagrant.chef_config_knife_not_found")
|
||||
end
|
||||
end
|
||||
|
||||
{ "chef client provisioner" => errors }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -33,6 +33,9 @@ en:
|
|||
stdout: %{stdout}
|
||||
|
||||
stderr: %{stderr}
|
||||
chef_config_knife_not_found: |-
|
||||
The `knife` application was not found! This is required by Vagrant
|
||||
to automatically delete Chef nodes and clients.
|
||||
chef_run_list_empty: |-
|
||||
Warning: Chef solo run list is empty. This may not be what you want.
|
||||
provisioner_cleanup: |-
|
||||
|
|
Loading…
Reference in New Issue