Permalink
Browse files

[COOK-2045] Add remi repo

  • Loading branch information...
1 parent 73f5f15 commit 67495ae9cd80bb3d36d357678d81c1ada68f8e92 @tk0miya tk0miya committed with jtimberman Dec 11, 2012
Showing with 87 additions and 0 deletions.
  1. +26 −0 README.md
  2. +28 −0 attributes/remi.rb
  3. +33 −0 recipes/remi.rb
View
@@ -46,6 +46,18 @@ EPEL attributes used in the `yum::epel` recipe, see
The `node['yum']['epel_release']` attribute is removed, see the __epel__
recipe information below.
+remi attributes used in the `yum::remi` recipe, see
+`attributes/remi.rb` for default values:
+
+* `yum['remi']['key']`
+ - Name of the GPG key used for the repo.
+
+* `yum['remi']['url']`
+ - URL to the remi mirrorlist.
+
+* `yum['remi']['key_url']`
+ - URL to the GPG key for the repo.
+
Proxy settings used in yum.conf on RHEL family 5 and 6:
* `yum['proxy']`
@@ -112,6 +124,15 @@ right version of the package to install.
The RepoForge repository requires EPEL, and includes `yum::epel` as a
dependency.
+## remi
+
+Install the [Les RPM de Remi - Repository](http://rpms.famillecollet.com/)
+with the `yum_key` and `yum_repository` resources from this cookbook
+are used to manage the remi repository. Use the `yum['remi']`
+attributes (see above) to configure the key, url and download the GPG
+key for the repo. The defaults are detected by platform and should
+just work without modification in most use cases.
+
# Resources/Providers
## key
@@ -204,8 +225,13 @@ Put `recipe[yum::yum]` in the run list to ensure yum is configured
correctly for your environment within your Chef run.
Use the `yum::epel` recipe to enable EPEL, or the `yum::ius` recipe to
+<<<<<<< HEAD
enable IUS, or the `yum::repoforge` recipe to enable RepoForge, per
__Recipes__ section above.
+=======
+enable IUS, or the `yum::remi` recipe to enable remi, per __Recipes__
+section above.
+>>>>>>> [COOK-2045] Add remi repo
You can manage GPG keys either with cookbook_file in a recipe if you
want to package it with a cookbook or use the `url` parameter of the
View
@@ -0,0 +1,28 @@
+#
+# Cookbook Name:: yum
+# Attributes:: remi
+#
+# Copyright 2011, 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.
+#
+
+case node['platform']
+when "fedora"
+ default['yum']['remi']['url'] = "http://rpms.famillecollet.com/fedora/#{node['platform_version'].to_i}/remi/mirror"
+else
+ default['yum']['remi']['url'] = "http://rpms.famillecollet.com/enterprise/#{node['platform_version'].to_i}/remi/mirror"
+end
+
+default['yum']['remi']['key'] = "RPM-GPG-KEY-remi"
+default['yum']['remi']['key_url'] = "http://rpms.famillecollet.com/#{node['yum']['remi']['key']}"
View
@@ -0,0 +1,33 @@
+#
+# Author:: Takeshi KOMIYA (<i.tkomiya@gmail.com>)
+# Cookbook Name:: yum
+# Recipe:: remi
+#
+# Copyright:: Copyright (c) 2011 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.
+
+include_recipe "yum::epel"
+
+yum_key node['yum']['remi']['key'] do
+ url node['yum']['remi']['key_url']
+ action :add
+end
+
+yum_repository "remi" do
+ description "Les RPM de remi pour Enterprise Linux #{node['platform_version']} - $basearch"
+ key node['yum']['remi']['key']
+ mirrorlist node['yum']['remi']['url']
+ failovermethod "priority"
+ action :add
+end

0 comments on commit 67495ae

Please sign in to comment.