summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2016-01-13 10:17:10 -0800
committerJohn Keiser <john@johnkeiser.com>2016-01-15 09:37:43 -0800
commit4444eb70463a0e5f1090007300182a42a909f249 (patch)
tree49e1780a71295b83095adb18ad233c4d7863741c
parent37cb1f8fd3eb988fd34d17d94e0d8a9eef05b27b (diff)
downloadchef-4444eb70463a0e5f1090007300182a42a909f249.tar.gz
Add local cookbook_artifacts
-rw-r--r--chef-config/lib/chef-config/config.rb14
-rw-r--r--lib/chef/chef_fs/config.rb1
-rw-r--r--lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb2
3 files changed, 10 insertions, 7 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 81e9cf3f68..47fca29e7f 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -144,13 +144,20 @@ module ChefConfig
# Location of acls on disk. String or array of strings.
# Defaults to <chef_repo_path>/acls.
- # Only applies to Enterprise Chef commands.
default(:acl_path) { derive_path_from_chef_repo_path("acls") }
# Location of clients on disk. String or array of strings.
# Defaults to <chef_repo_path>/acls.
default(:client_path) { derive_path_from_chef_repo_path("clients") }
+ # Location of containers on disk. String or array of strings.
+ # Defaults to <chef_repo_path>/containers.
+ default(:container_path) { derive_path_from_chef_repo_path("containers") }
+
+ # Location of cookbook_artifacts on disk. String or array of strings.
+ # Defaults to <chef_repo_path>/cookbook_artifacts.
+ default(:cookbook_artifact_path) { derive_path_from_chef_repo_path("cookbook_artifacts") }
+
# Location of cookbooks on disk. String or array of strings.
# Defaults to <chef_repo_path>/cookbooks. If chef_repo_path
# is not specified, this is set to [/var/chef/cookbooks, /var/chef/site-cookbooks]).
@@ -163,11 +170,6 @@ module ChefConfig
end
end
- # Location of containers on disk. String or array of strings.
- # Defaults to <chef_repo_path>/containers.
- # Only applies to Enterprise Chef commands.
- default(:container_path) { derive_path_from_chef_repo_path("containers") }
-
# Location of data bags on disk. String or array of strings.
# Defaults to <chef_repo_path>/data_bags.
default(:data_bag_path) { derive_path_from_chef_repo_path("data_bags") }
diff --git a/lib/chef/chef_fs/config.rb b/lib/chef/chef_fs/config.rb
index dbba396ebb..29579be677 100644
--- a/lib/chef/chef_fs/config.rb
+++ b/lib/chef/chef_fs/config.rb
@@ -33,6 +33,7 @@ class Chef
"acls" => "acl",
"clients" => "client",
"cookbooks" => "cookbook",
+ "cookbook_artifacts" => "cookbook_artifact",
"containers" => "container",
"data_bags" => "data_bag",
"environments" => "environment",
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
index 3cb3c914b2..6cd079120f 100644
--- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
+++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb
@@ -162,7 +162,7 @@ class Chef
return NonexistentFSObject.new(name, self)
end
case name
- when "cookbooks"
+ when "cookbooks", "cookbook_artifacts"
if versioned_cookbooks
dirs = paths.map { |path| ChefRepositoryFileSystemVersionedCookbooksDir.new(name, self, path) }
else