Skip to content

Commit

Permalink
- Update License.
Browse files Browse the repository at this point in the history
Signed-off-by: Scott M. Likens <scott@likens.us>
  • Loading branch information
scottmlikens committed Jul 13, 2009
1 parent dd2b38e commit d4b7ac5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
27 changes: 20 additions & 7 deletions ssh_known_hosts/recipes/default.rb
@@ -1,12 +1,25 @@
#
# Cookbook Name:: snmp
# Cookbook Name:: apache2
# Recipe:: default
#
# Copyright 2009, Adapp, Inc.
# Copyright 2008, OpsCode, Inc.
#
# 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.
#

require 'chef/log'

my_fqdn = []
my_hostname = []
my_host_rsa_public = []
my_host_ip = []

Expand All @@ -20,9 +33,9 @@
Chef::Log.debug("IP Address #{y}")
my_host_ip << y
end
server['fqdn'].each do |z|
Chef::Log.debug("FQDN #{z}")
my_fqdn << z
server['hostname'].each do |z|
Chef::Log.debug("hostname #{z}")
my_hostname << z
end
end

Expand All @@ -33,7 +46,7 @@
group "root"
variables(
:ip => my_host_ip,
:fqdn => my_fqdn,
:hostname => my_hostname,
:host_rsa_public => my_host_rsa_public
)
end
2 changes: 1 addition & 1 deletion ssh_known_hosts/templates/default/known_hosts.erb
@@ -1,5 +1,5 @@
# THIS FILE IS MAINTAINED BY CHEF, DO NOT MODIFY AS IT WILL BE OVERWRITTEN
<% @fqdn.each do |x| -%>
<% @hostname.each do |x| -%>
<% @host_rsa_public.each do |y| -%>
<%= x %> ssh-rsa <%= y %>
<% end -%>
Expand Down

0 comments on commit d4b7ac5

Please sign in to comment.