summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/knife.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2013-03-13 17:02:26 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:28 -0700
commit09144c1e062e3f95b27160a2c58ade441b6ea4ab (patch)
treeace1df382efbb2e4dbf617355758804ee7a91bc2 /lib/chef/chef_fs/knife.rb
parent3c165bdd9f7af8745456e7ee945327a0af3ddc2f (diff)
downloadchef-09144c1e062e3f95b27160a2c58ade441b6ea4ab.tar.gz
Add repo_mode=hosted_everything, /groups entry
Diffstat (limited to 'lib/chef/chef_fs/knife.rb')
-rw-r--r--lib/chef/chef_fs/knife.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb
index 04e691b57f..30f1a8aa0a 100644
--- a/lib/chef/chef_fs/knife.rb
+++ b/lib/chef/chef_fs/knife.rb
@@ -28,7 +28,7 @@ class Chef
def self.common_options
option :repo_mode,
:long => '--repo-mode MODE',
- :description => "Specifies the local repository layout. Values: default or everything"
+ :description => "Specifies the local repository layout. Values: default, everything, hosted_everything"
option :chef_repo_path,
:long => '--chef-repo-path PATH',
@@ -40,7 +40,7 @@ class Chef
Chef::Config[:repo_mode] = config[:repo_mode] if config[:repo_mode]
# --chef-repo-path overrides all other paths
- path_variables = %w(client_path cookbook_path data_bag_path environment_path node_path role_path user_path)
+ path_variables = %w(client_path cookbook_path data_bag_path environment_path group_path node_path role_path user_path)
if config[:chef_repo_path]
Chef::Config[:chef_repo_path] = config[:chef_repo_path]
path_variables.each do |variable_name|
@@ -80,7 +80,7 @@ class Chef
end
def chef_fs
- @chef_fs ||= Chef::ChefFS::FileSystem::ChefServerRootDir.new("remote", Chef::Config, Chef::Config[:repo_mode])
+ @chef_fs ||= Chef::ChefFS::FileSystem::ChefServerRootDir.new("remote", Chef::Config)
end
def object_paths
@@ -91,8 +91,11 @@ class Chef
end
result = {}
- if Chef::Config[:repo_mode] == 'everything'
+ case Chef::Config[:repo_mode]
+ when 'everything'
object_names = %w(clients cookbooks data_bags environments nodes roles users)
+ when 'hosted_everything'
+ object_names = %w(clients cookbooks data_bags environments groups nodes roles)
else
object_names = %w(cookbooks data_bags environments roles)
end