Skip to content

Commit

Permalink
added :file_cache_path and :file_backup_path as configurable parameters
Browse files Browse the repository at this point in the history
removed deprecated :file_store_path parameter
  • Loading branch information
aglarond authored and mitchellh committed Feb 26, 2011
1 parent b1bc49c commit 6f9387a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion lib/vagrant/provisioners/chef_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ class Config < Chef::Config
attr_accessor :validation_key_path
attr_accessor :validation_client_name
attr_accessor :client_key_path
attr_accessor :file_cache_path
attr_accessor :file_backup_path

def initialize
super

@validation_client_name = "chef-validator"
@client_key_path = "/etc/chef/client.pem"
@file_cache_path = "/srv/chef/file_store"
@file_backup_path = "/srv/chef/cache"
end

def validate(errors)
Expand Down Expand Up @@ -65,7 +69,9 @@ def setup_server_config
:chef_server_url => config.chef_server_url,
:validation_client_name => config.validation_client_name,
: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
})
end

Expand Down
4 changes: 2 additions & 2 deletions templates/chef_server_client.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ validation_client_name "<%= validation_client_name %>"
validation_key "<%= validation_key %>"
client_key "<%= client_key %>"

file_store_path "/srv/chef/file_store"
file_cache_path "/srv/chef/cache"
file_cache_path "<%= file_cache_path %>"
file_backup_path "<%= file_backup_path %>"

pid_file "/var/run/chef/chef-client.pid"

Expand Down
4 changes: 3 additions & 1 deletion test/vagrant/provisioners/chef_server_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ class ChefServerProvisionerTest < Test::Unit::TestCase
:chef_server_url => @config.chef_server_url,
:validation_client_name => @config.validation_client_name,
:validation_key => @action.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
})

@action.setup_server_config
Expand Down

0 comments on commit 6f9387a

Please sign in to comment.