Modernize chef solo configuration

This commit is contained in:
Mitchell Hashimoto 2013-02-05 22:07:50 -08:00
parent 1af3255559
commit a74fc014d6
2 changed files with 9 additions and 2 deletions

View File

@ -16,7 +16,11 @@ module VagrantPlugins
super
@cookbooks_path = UNSET_VALUE
@data_bags_path = UNSET_VALUE
@recipe_url = UNSET_VALUE
@roles_path = UNSET_VALUE
@encrypted_data_bag_secret = UNSET_VALUE
@encrypted_data_bag_secret_key_path = UNSET_VALUE
@nfs = UNSET_VALUE
end
@ -31,9 +35,14 @@ module VagrantPlugins
path
end
@data_bags_path = [] if @data_bags_path == UNSET_VALUE
@encrypted_data_bag_secret = "/tmp/encrypted_data_bag_secret" if \
@encrypted_data_bag_secret == UNSET_VALUE
@encrypted_data_bag_secret_key_path = nil if \
@encrypted_data_bag_secret_key_path == UNSET_VALUE
@nfs = false if @nfs == UNSET_VALUE
@recipe_url = nil if @recipe_url == UNSET_VALUE
@roles_path = [] if @roles_path == UNSET_VALUE
end
def validate(machine)

View File

@ -55,8 +55,6 @@ module VagrantPlugins
# Converts paths to a list of properly expanded paths with types.
def expanded_folders(paths, appended_folder=nil)
return [] if paths.nil?
# Convert the path to an array if it is a string or just a single
# path element which contains the folder location (:host or :vm)
paths = [paths] if paths.is_a?(String) || paths.first.is_a?(Symbol)