Closed ikeji closed 10 years ago
NoMethodError ------------- No resource or method named `chef_solo_search_installed?' for `Chef::Recipe "configure_gitzone"' Cookbook Trace: --------------- /tmp/vagrant-chef-1/chef-solo-1/cookbooks/gitzone/recipes/configure_gitzone.rb:30:in `from_file' /tmp/vagrant-chef-1/chef-solo-1/cookbooks/gitzone/recipes/configure.rb:7:in `from_file' /tmp/vagrant-chef-1/chef-solo-1/cookbooks/gitzone/recipes/default.rb:28:in `from_file' Relevant File Content: ---------------------- /tmp/vagrant-chef-1/chef-solo-1/cookbooks/gitzone/recipes/configure_gitzone.rb: 23: action :create 24: #password '' 25: #password# Run: openssl passwd -1 "theplaintextpassword" 26: end 27: 28: # deploy ssh pub keys to authorized_keys file 29: ssh_keys = node['gitzone']['user_ssh_pub_keys'] 30>> if Chef::Config[:solo] and not chef_solo_search_installed? 31: Chef::Log.warn("This recipe uses search. Chef Solo does not support search unless you install the chef-solo-search cookbook.") 32: else 33: # search for gitzone managed hosts 34: #search(:node, node[:gitzone][:search_query_managed_nodes] + " AND root_ssh_pub_keys:['' TO * ]").each do |n| 35: search(:node, node[:gitzone][:search_query_managed_nodes] + " AND root_ssh_pub_keys:*").each do |n| 36: node.set[:gitzone][:managed_nodes_pub_keys] = (node[:gitzone][:managed_nodes_pub_keys] + n[:root_ssh_pub_keys]).uniq.sort #unless n[:root_ssh_pub_keys].nil? 37: end 38: ssh_keys = (ssh_keys + node[:gitzone][:managed_nodes_pub_keys]).uniq.sort 39: end
This happen even if I add "chef-solo-search" to my Berksfile.
This happen even if I add "chef-solo-search" to my Berksfile.