Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

allow to override file_cache_path #527

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/chef/knife/solo_cook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class SoloCook < Knife
:long => '--provisioning-path path',
:description => 'Where to store kitchen data on the node'

option :file_cache_path,
:long => '--file_cache_path path',
:description => 'Where to store cache data on the node'

option :clean_up,
:long => '--clean-up',
:description => 'Run the clean command after cooking'
Expand Down Expand Up @@ -159,6 +163,10 @@ def enable_reporting
config_value(:enable_reporting, true)
end

def file_cache_path
config_value(:file_cache_path, nil)
end

def expand_path(path)
Pathname.new(path).expand_path
end
Expand Down
5 changes: 5 additions & 0 deletions lib/knife-solo/resources/solo.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ role_path File.join(base, 'roles')
data_bag_path File.join(base, 'data_bags')
encrypted_data_bag_secret File.join(base, 'data_bag_key')
environment_path File.join(base, 'environments')

<% if file_cache_path %>
file_cache_path <%= file_cache_path.inspect %>
<% end %>

environment <%= node_environment.inspect %>
ssl_verify_mode <%= ssl_verify_mode.inspect %>
solo_legacy_mode <%= solo_legacy_mode.inspect %>
Expand Down