Commit dfe9d76c authored by jtimberman's avatar jtimberman Committed by sdelano
Browse files

CHEF-2212, install rubygems 1.3.7 on centos5

* Fixes CHEF-2212 installing rubygems 1.3.7 from source.
* Also clean up whitespace and default node name comments
parent fe7cd7db
bash -c '
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
if [ ! -f /usr/bin/chef-client ]; then
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
yum install -q -y ruby ruby-devel gcc gcc-c++ automake autoconf rubygems make
yum install -q -y ruby ruby-devel gcc gcc-c++ automake autoconf make
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar zxf rubygems-1.3.7.tgz
cd rubygems-1.3.7
ruby setup.rb --no-format-executable
fi
gem update --system
gem update
......@@ -26,10 +34,10 @@ log_location STDOUT
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
<% if @config[:chef_node_name] == nil %>
# Using default node name"
# Using default node name (fqdn)
<% else %>
node_name "<%= @config[:chef_node_name] %>"
<% end %>
<% end %>
EOP
) > /etc/chef/client.rb
......
......@@ -26,7 +26,7 @@ validation_client_name "<%= Chef::Config[:validation_client_name] %>"
# Using default node name"
<% else %>
node_name "<%= @config[:chef_node_name] %>"
<% end %>
<% end %>
EOP
) > /etc/chef/client.rb
......
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
echo "chef chef/chef_server_url string <%= Chef::Config[:chef_server_url] %>" | debconf-set-selections
echo "chef chef/chef_server_url string <%= Chef::Config[:chef_server_url] %>" | debconf-set-selections
[ -f /etc/apt/sources.list.d/opscode.list ] || echo "deb http://apt.opscode.com lucid main" > /etc/apt/sources.list.d/opscode.list
wget -O- http://apt.opscode.com/packages@opscode.com.gpg.key | apt-key add -
fi
......@@ -21,7 +21,7 @@ rm /tmp/validation.pem
<% if @config[:chef_node_name] %>
[ `grep -qx "node_name \"<%= @config[:chef_node_name] %>\"" /etc/chef/client.rb` ] || echo "node_name \"<%= @config[:chef_node_name] %>\"" >> /etc/chef/client.rb
<% end -%>
<% end -%>
(
cat <<'EOP'
......
......@@ -29,7 +29,7 @@ log_location STDOUT
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
<% if @config[:chef_node_name] == nil %>
# Using default node name"
# Using default node name (fqdn)
<% else %>
node_name "<%= @config[:chef_node_name] %>"
<% end %>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment