Moves to using new chef cache/backup dir defaults.

Conflicts:
	plugins/provisioners/chef/provisioner/base.rb
This commit is contained in:
Patrick Connolly 2013-07-04 12:49:37 -04:00 committed by Mitchell Hashimoto
parent 4713f146b4
commit 7e0050527d
7 changed files with 11 additions and 14 deletions

View File

@ -19,6 +19,8 @@ module VagrantPlugins
attr_accessor :node_name attr_accessor :node_name
attr_accessor :provisioning_path attr_accessor :provisioning_path
attr_accessor :run_list attr_accessor :run_list
attr_accessor :file_cache_path
attr_accessor :file_backup_path
def initialize def initialize
super super
@ -38,6 +40,8 @@ module VagrantPlugins
@no_proxy = UNSET_VALUE @no_proxy = UNSET_VALUE
@node_name = UNSET_VALUE @node_name = UNSET_VALUE
@provisioning_path = UNSET_VALUE @provisioning_path = UNSET_VALUE
@file_cache_path = UNSET_VALUE
@file_backup_path = UNSET_VALUE
@json = {} @json = {}
@run_list = [] @run_list = []
@ -59,6 +63,8 @@ module VagrantPlugins
@no_proxy = nil if @no_proxy == UNSET_VALUE @no_proxy = nil if @no_proxy == UNSET_VALUE
@node_name = nil if @node_name == UNSET_VALUE @node_name = nil if @node_name == UNSET_VALUE
@provisioning_path = nil if @provisioning_path == UNSET_VALUE @provisioning_path = nil if @provisioning_path == UNSET_VALUE
@file_backup_path = "/var/chef/backup" if @file_backup_path == UNSET_VALUE
@file_cache_path = "/var/chef/cache" if @file_cache_path == UNSET_VALUE
# Make sure the log level is a symbol # Make sure the log level is a symbol
@log_level = @log_level.to_sym @log_level = @log_level.to_sym

View File

@ -9,8 +9,6 @@ module VagrantPlugins
attr_accessor :encrypted_data_bag_secret_key_path attr_accessor :encrypted_data_bag_secret_key_path
attr_accessor :encrypted_data_bag_secret attr_accessor :encrypted_data_bag_secret
attr_accessor :environment attr_accessor :environment
attr_accessor :file_cache_path
attr_accessor :file_backup_path
attr_accessor :validation_key_path attr_accessor :validation_key_path
attr_accessor :validation_client_name attr_accessor :validation_client_name
@ -22,8 +20,6 @@ module VagrantPlugins
@encrypted_data_bag_secret_key_path = UNSET_VALUE @encrypted_data_bag_secret_key_path = UNSET_VALUE
@encrypted_data_bag_secret = UNSET_VALUE @encrypted_data_bag_secret = UNSET_VALUE
@environment = UNSET_VALUE @environment = UNSET_VALUE
@file_cache_path = UNSET_VALUE
@file_backup_path = UNSET_VALUE
@validation_key_path = UNSET_VALUE @validation_key_path = UNSET_VALUE
@validation_client_name = UNSET_VALUE @validation_client_name = UNSET_VALUE
end end
@ -36,8 +32,6 @@ module VagrantPlugins
@encrypted_data_bag_secret_key_path = nil if @encrypted_data_bag_secret_key_path == UNSET_VALUE @encrypted_data_bag_secret_key_path = nil if @encrypted_data_bag_secret_key_path == UNSET_VALUE
@encrypted_data_bag_secret = "/tmp/encrypted_data_bag_secret" if @encrypted_data_bag_secret == UNSET_VALUE @encrypted_data_bag_secret = "/tmp/encrypted_data_bag_secret" if @encrypted_data_bag_secret == UNSET_VALUE
@environment = nil if @environment == UNSET_VALUE @environment = nil if @environment == UNSET_VALUE
@file_backup_path = "/srv/chef/cache" if @file_backup_path == UNSET_VALUE
@file_cache_path = "/srv/chef/file_store" if @file_cache_path == UNSET_VALUE
@validation_client_name = "chef-validator" if @validation_client_name == UNSET_VALUE @validation_client_name = "chef-validator" if @validation_client_name == UNSET_VALUE
@validation_key_path = nil if @validation_key_path == UNSET_VALUE @validation_key_path = nil if @validation_key_path == UNSET_VALUE
end end

View File

@ -11,7 +11,6 @@ module VagrantPlugins
attr_accessor :nfs attr_accessor :nfs
attr_accessor :encrypted_data_bag_secret_key_path attr_accessor :encrypted_data_bag_secret_key_path
attr_accessor :encrypted_data_bag_secret attr_accessor :encrypted_data_bag_secret
attr_accessor :file_cache_path
def initialize def initialize
super super
@ -23,7 +22,6 @@ module VagrantPlugins
@nfs = UNSET_VALUE @nfs = UNSET_VALUE
@encrypted_data_bag_secret = UNSET_VALUE @encrypted_data_bag_secret = UNSET_VALUE
@encrypted_data_bag_secret_key_path = UNSET_VALUE @encrypted_data_bag_secret_key_path = UNSET_VALUE
@file_cache_path = UNSET_VALUE
@__defaulted_cookbooks_path = false @__defaulted_cookbooks_path = false
end end
@ -57,8 +55,6 @@ module VagrantPlugins
@encrypted_data_bag_secret == UNSET_VALUE @encrypted_data_bag_secret == UNSET_VALUE
@encrypted_data_bag_secret_key_path = nil if \ @encrypted_data_bag_secret_key_path = nil if \
@encrypted_data_bag_secret_key_path == UNSET_VALUE @encrypted_data_bag_secret_key_path == UNSET_VALUE
@file_cache_path = nil if \
@file_cache_path == UNSET_VALUE
end end
def validate(machine) def validate(machine)

View File

@ -60,6 +60,9 @@ module VagrantPlugins
config_file = Vagrant::Util::TemplateRenderer.render(template, { config_file = Vagrant::Util::TemplateRenderer.render(template, {
:custom_configuration => remote_custom_config_path, :custom_configuration => remote_custom_config_path,
:file_cache_path => @config.file_cache_path,
:file_backup_path => @config.file_backup_path,
:log_level => @config.log_level.to_sym,
:http_proxy => @config.http_proxy, :http_proxy => @config.http_proxy,
:http_proxy_user => @config.http_proxy_user, :http_proxy_user => @config.http_proxy_user,
:http_proxy_pass => @config.http_proxy_pass, :http_proxy_pass => @config.http_proxy_pass,

View File

@ -50,8 +50,6 @@ module VagrantPlugins
:validation_client_name => @config.validation_client_name, :validation_client_name => @config.validation_client_name,
:validation_key => guest_validation_key_path, :validation_key => guest_validation_key_path,
:client_key => @config.client_key_path, :client_key => @config.client_key_path,
:file_cache_path => @config.file_cache_path,
:file_backup_path => @config.file_backup_path,
:environment => @config.environment, :environment => @config.environment,
:encrypted_data_bag_secret => @config.encrypted_data_bag_secret :encrypted_data_bag_secret => @config.encrypted_data_bag_secret
}) })

View File

@ -133,7 +133,6 @@ module VagrantPlugins
:roles_path => roles_path, :roles_path => roles_path,
:data_bags_path => data_bags_path, :data_bags_path => data_bags_path,
:encrypted_data_bag_secret => @config.encrypted_data_bag_secret, :encrypted_data_bag_secret => @config.encrypted_data_bag_secret,
:file_cache_path => @config.file_cache_path || @config.provisioning_path,
}) })
end end

View File

@ -1,7 +1,8 @@
<% if node_name %> <% if node_name %>
node_name "<%= node_name %>" node_name "<%= node_name %>"
<% end %> <% end %>
file_cache_path "<%= file_cache_path %>" file_cache_path "<%= file_cache_path %>"
file_backup_path "<%= file_backup_path %>"
cookbook_path <%= cookbooks_path.inspect %> cookbook_path <%= cookbooks_path.inspect %>
<% if roles_path %> <% if roles_path %>
role_path <%= roles_path.inspect %> role_path <%= roles_path.inspect %>