diff options
author | jtimberman <joshua@opscode.com> | 2011-04-10 23:02:50 -0600 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2011-04-10 22:10:05 -0700 |
commit | b77ada5f2108e50acfdd9ddc7037ed4124a154c9 (patch) | |
tree | 4d7b1e1b9a553e0be0f16e3953e35c81a739ffbb | |
parent | 6a6296ce177e336b61b44b34ad1844574a04b420 (diff) | |
download | chef-b77ada5f2108e50acfdd9ddc7037ed4124a154c9.tar.gz |
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
-rw-r--r-- | chef/lib/chef/knife/bootstrap/centos5-gems.erb | 20 | ||||
-rw-r--r-- | chef/lib/chef/knife/bootstrap/fedora13-gems.erb | 2 | ||||
-rw-r--r-- | chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb | 4 | ||||
-rw-r--r-- | chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb | 2 |
4 files changed, 17 insertions, 11 deletions
diff --git a/chef/lib/chef/knife/bootstrap/centos5-gems.erb b/chef/lib/chef/knife/bootstrap/centos5-gems.erb index 0646f613c3..4f1256c173 100644 --- a/chef/lib/chef/knife/bootstrap/centos5-gems.erb +++ b/chef/lib/chef/knife/bootstrap/centos5-gems.erb @@ -1,11 +1,17 @@ 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 gem install ohai chef --no-rdoc --no-ri --verbose <%= '--prerelease' if @config[:prerelease] %> mkdir -p /etc/chef @@ -25,10 +31,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 diff --git a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb index 301f377dd3..c0b78f6323 100644 --- a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb +++ b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb @@ -25,7 +25,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 diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb index ab81c9713e..47690792b7 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb @@ -1,6 +1,6 @@ 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' diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb index 0b0dd1e332..31bb54d834 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb @@ -27,7 +27,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 %> |