Permalink
Browse files

Merge branch 'master' into basho_riak

  • Loading branch information...
2 parents 684bb8e + 521c8f4 commit 05d5c24f4975110c1cb2201abc919886407b0a1e @b committed Jun 10, 2010
View
@@ -1,6 +1,7 @@
require 'rubygems'
require 'chef'
require 'json'
+TOPDIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
TOPDIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
@@ -17,6 +17,9 @@
# limitations under the License.
#
+Chef::Log.warn("This recipe will be deprecated soon, please use chef::bootstrap_client")
+Chef::Log.warn("See the 'chef' cookbook's README.md for more information.")
+
root_group = value_for_platform(
"openbsd" => { "default" => "wheel" },
"freebsd" => { "default" => "wheel" },
@@ -21,6 +21,9 @@
# limitations under the License.
#
+Chef::Log.warn("This recipe will be deprecated soon, please use chef::bootstrap_server")
+Chef::Log.warn("See the 'chef' cookbook's README.md for more information.")
+
root_group = value_for_platform(
"openbsd" => { "default" => "wheel" },
"freebsd" => { "default" => "wheel" },
@@ -44,5 +44,5 @@
set_unless[:chef][:webui_enabled] = false
set_unless[:chef][:validation_client_name] = "chef-validator"
-set_unless[:chef][:server_fqdn] = node.has_key?(domain) ? "chef.#{domain}" : "chef"
+set_unless[:chef][:server_fqdn] = node.has_key?(:domain) ? "chef.#{domain}" : "chef"
set_unless[:chef][:server_url] = "#{node.chef.url_type}://#{node.chef.server_fqdn}:#{node.chef.server_port}"
@@ -17,6 +17,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+include_attribute "chef"
+
set_unless[:chef][:doc_root] = "#{languages[:ruby][:gems_dir]}/gems/chef-server-webui-#{chef[:server_version]}/public"
set_unless[:chef][:server_ssl_req] = "/C=US/ST=Several/L=Locality/O=Example/OU=Operations/" +
@@ -62,7 +62,7 @@
include_recipe "zlib"
include_recipe "xml"
-server_gems = %w{ chef-server chef-server-api chef-solr }
+server_gems = %w{ chef-server-api chef-solr }
server_services = %w{ chef-server chef-solr chef-solr-indexer }
if node.chef.attribute?("webui_enabled")
@@ -159,7 +159,7 @@
end
service "#{svc}" do
- action :enable
+ action [ :enable, :start ]
end
end
View
@@ -40,7 +40,12 @@
end
notifies value_for_platform(
"debian" => { "4.0" => :run, "default" => :nothing },
- "ubuntu" => { "default" => :run, "9.10" => :nothing }
+ "ubuntu" => {
+ "default" => :nothing,
+ "9.04" => :run,
+ "8.10" => :run,
+ "8.04" => :run
+ }
), resources(:execute => "start-runsvdir"), :immediately
notifies value_for_platform(
"debian" => { "squeeze/sid" => :run, "default" => :nothing },
@@ -6,15 +6,15 @@ Build /etc/ssh/known_hosts based on search indexes and build it based on data re
== Platform: Doesn't matter, should work on anything.
-= USAGE:
+= ATTRIBUTES:
-Generates /etc/ssh/known_hosts based on search indexes for RSA keys.
+= USAGE: Generates /etc/ssh/known_hosts based on search indexes.
= LICENSE and AUTHOR:
Author:: Scott M. Likens (<scott@likens.us>)
-Copyright:: 2009, Scott M. Likens
+Copyright:: 2009, Opscode, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -1,45 +1,30 @@
{
- "maintainer": "Scott M. Likens",
- "attributes": {
+ "replacing": {
},
- "suggestions": {
+ "attributes": {
},
"platforms": {
- "ubuntu": [
-
- ],
- "fedora": [
-
- ],
- "centos": [
-
- ],
- "debian": [
-
- ],
- "redhat": [
-
- ]
+ },
+ "groupings": {
},
"dependencies": {
},
- "maintainer_email": "scott@likens.us",
- "conflicting": {
+ "long_description": "= DESCRIPTION: \n\nBuild /etc/ssh/known_hosts based on search indexes and build it based on data retrieved by ohai.\n\n= REQUIREMENTS: \n\n== Platform: Doesn't matter, should work on anything.\n\n= ATTRIBUTES:\n\n= USAGE: Generates /etc/ssh/known_hosts based on search indexes.\n\n= LICENSE and AUTHOR: \n\nAuthor:: Scott M. Likens (<scott@likens.us>)\n\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n",
+ "recommendations": {
},
- "version": "0.1.0",
+ "version": "0.2.0",
+ "maintainer": "Scott M. Likens",
"name": "ssh_known_hosts",
+ "suggestions": {
+ },
"recipes": {
"ssh_known_hosts::default": "Dyanmically generates /etc/ssh/known_hosts based on search indexes"
},
- "providing": {
- },
"license": "Apache 2.0",
- "replacing": {
- },
- "groupings": {
+ "maintainer_email": "scott@likens.us",
+ "conflicting": {
},
- "long_description": "= DESCRIPTION: \n\nBuild /etc/ssh/known_hosts based on search indexes and build it based on data retrieved by ohai.\n\n= REQUIREMENTS: \n\n== Platform: Doesn't matter, should work on anything.\n\n= USAGE:\n\nGenerates /etc/ssh/known_hosts based on search indexes for RSA keys.\n\n= LICENSE and AUTHOR: \n\nAuthor:: Scott M. Likens (<scott@likens.us>)\n\nCopyright:: 2009, Scott M. Likens\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n",
- "recommendations": {
+ "providing": {
},
"description": "Dyanmically generates /etc/ssh/known_hosts based on search indexes"
}
@@ -3,9 +3,5 @@
license "Apache 2.0"
description "Dyanmically generates /etc/ssh/known_hosts based on search indexes"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.1"
+version "0.2.0"
recipe "ssh_known_hosts::default", "Dyanmically generates /etc/ssh/known_hosts based on search indexes"
-
-%w{ redhat centos fedora ubuntu debian }.each do |os|
- supports os
-end
@@ -2,29 +2,20 @@
# Cookbook Name:: ssh_known_hosts
# Recipe:: default
#
-# Copyright 2009, Scott M. Likens
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
+# Copyright 2009, Adapp, Inc.
+sleep 2
nodes = []
-search(:node, "*", %w{ keys_ssh_host_rsa_public ipaddress hostname }) {|n| nodes << n}
+search(:node, "*:*") do |z|
+ nodes << z
+end
template "/etc/ssh/ssh_known_hosts" do
source "known_hosts.erb"
mode 0440
owner "root"
group "root"
+ backup false
variables(
:nodes => nodes
)
@@ -1,6 +1,5 @@
# THIS FILE IS MAINTAINED BY CHEF, DO NOT MODIFY AS IT WILL BE OVERWRITTEN
<% @nodes.each do |n| -%>
- <% if n.has_key?('keys_ssh_host_rsa_public') && n['keys_ssh_host_rsa_public'].length > 0 -%>
-<%= n['hostname'] %>,<%= n['ipaddress'] %> ssh-rsa <%= n['keys_ssh_host_rsa_public'] %>
- <% end -%>
+<%= n['hostname'] %>,<%= n['ipaddress'] %> ssh-rsa <%= n['keys']['ssh']['host_rsa_public'] %>
+<%= n['hostname'] %>,<%= n['ipaddress'] %> ssh-dsa <%= n['keys']['ssh']['host_dsa_public'] %>
<% end -%>

0 comments on commit 05d5c24

Please sign in to comment.