Initial Chef repository
This commit is contained in:
63
cookbooks/yum-epel/CHANGELOG.md
Normal file
63
cookbooks/yum-epel/CHANGELOG.md
Normal file
@@ -0,0 +1,63 @@
|
||||
yum-epel Cookbook CHANGELOG
|
||||
======================
|
||||
|
||||
v0.6.0 (2015-01-03)
|
||||
-------------------
|
||||
- Adding EL7 support
|
||||
|
||||
v0.5.3 (2014-10-28)
|
||||
-------------------
|
||||
- Revert Use HTTPS for GPG keys and mirror lists
|
||||
|
||||
v0.5.2 (2014-10-28)
|
||||
-------------------
|
||||
- Use HTTPS for GPG keys and mirror lists
|
||||
- Use local key on Amazon Linux
|
||||
|
||||
v0.5.0 (2014-09-02)
|
||||
-------------------
|
||||
- Add all attribute available to LWRP to allow for tuning.
|
||||
|
||||
v0.4.0 (2014-07-27)
|
||||
-------------------
|
||||
- [#9] Allowing list of repositories to reference configurable.
|
||||
|
||||
|
||||
v0.3.6 (2014-04-09)
|
||||
-------------------
|
||||
- [COOK-4509] add RHEL7 support to yum-epel cookbook
|
||||
|
||||
|
||||
v0.3.4 (2014-02-19)
|
||||
-------------------
|
||||
COOK-4353 - Fixing typo in readme
|
||||
|
||||
|
||||
v0.3.2 (2014-02-13)
|
||||
-------------------
|
||||
Updating README to explain the 'managed' parameter
|
||||
|
||||
|
||||
v0.3.0 (2014-02-12)
|
||||
-------------------
|
||||
[COOK-4292] - Do not manage secondary repos by default
|
||||
|
||||
|
||||
v0.2.0
|
||||
------
|
||||
Adding Amazon Linux support
|
||||
|
||||
|
||||
v0.1.6
|
||||
------
|
||||
Fixing up attribute values for EL6
|
||||
|
||||
|
||||
v0.1.4
|
||||
------
|
||||
Adding CHANGELOG.md
|
||||
|
||||
|
||||
v0.1.0
|
||||
------
|
||||
initial release
|
||||
162
cookbooks/yum-epel/README.md
Normal file
162
cookbooks/yum-epel/README.md
Normal file
@@ -0,0 +1,162 @@
|
||||
yum-epel Cookbook
|
||||
============
|
||||
|
||||
The yum-epel cookbook takes over management of the default
|
||||
repositoryids shipped with epel-release. It allows attribute
|
||||
manipulation of `epel`, `epel-debuginfo`, `epel-source`, `epel-testing`,
|
||||
`epel-testing-debuginfo`, and `epel-testing-source`.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
* Chef 11 or higher
|
||||
* yum cookbook version 3.0.0 or higher
|
||||
|
||||
Attributes
|
||||
----------
|
||||
The following attributes are set by default
|
||||
|
||||
``` ruby
|
||||
default['yum-epel']['repositories'] = %w{epel epel-debuginfo epel-source epel-testing epel-testing-debuginfo epel-testing-source}
|
||||
```
|
||||
|
||||
``` ruby
|
||||
default['yum']['epel']['repositoryid'] = 'epel'
|
||||
default['yum']['epel']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch'
|
||||
default['yum']['epel']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
default['yum']['epel']['failovermethod'] = 'priority'
|
||||
default['yum']['epel']['gpgcheck'] = true
|
||||
default['yum']['epel']['enabled'] = true
|
||||
default['yum']['epel']['managed'] = true
|
||||
```
|
||||
|
||||
``` ruby
|
||||
default['yum']['epel-debuginfo']['repositoryid'] = 'epel-debuginfo'
|
||||
default['yum']['epel-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch - Debug'
|
||||
default['yum']['epel-debuginfo']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch'
|
||||
default['yum']['epel-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
default['yum']['epel-debuginfo']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-debuginfo']['gpgcheck'] = true
|
||||
default['yum']['epel-debuginfo']['enabled'] = false
|
||||
default['yum']['epel-debuginfo']['managed'] = false
|
||||
```
|
||||
|
||||
``` ruby
|
||||
default['yum']['epel-source']['repositoryid'] = 'epel-source'
|
||||
default['yum']['epel-source']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch - Source'
|
||||
default['yum']['epel-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-6&arch=$basearch'
|
||||
default['yum']['epel-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
default['yum']['epel-source']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-source']['gpgcheck'] = true
|
||||
default['yum']['epel-source']['enabled'] = false
|
||||
default['yum']['epel-source']['managed'] = false
|
||||
```
|
||||
|
||||
``` ruby
|
||||
default['yum']['epel-testing']['repositoryid'] = 'epel-testing'
|
||||
default['yum']['epel-testing']['description'] = 'Extra Packages for Enterprise Linux 6 - Testing - $basearch'
|
||||
default['yum']['epel-testing']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch'
|
||||
default['yum']['epel-testing']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6r'
|
||||
default['yum']['epel-testing']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-testing']['gpgcheck'] = true
|
||||
default['yum']['epel-testing']['enabled'] = false
|
||||
default['yum']['epel-testing']['managed'] = false
|
||||
```
|
||||
|
||||
``` ruby
|
||||
default['yum']['epel-testing-debuginfo']['repositoryid'] = 'epel-testing-debuginfo'
|
||||
default['yum']['epel-testing-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 6 - Testing - $basearch Debug'
|
||||
default['yum']['epel-testing-debuginfo']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch'
|
||||
default['yum']['epel-testing-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
default['yum']['epel-testing-debuginfo']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-testing-debuginfo']['gpgcheck'] = true
|
||||
default['yum']['epel-testing-debuginfo']['enabled'] = false
|
||||
default['yum']['epel-testing-debuginfo']['managed'] = false
|
||||
```
|
||||
|
||||
``` ruby
|
||||
default['yum']['epel-testing-source']['repositoryid'] = 'epel-testing-source'
|
||||
default['yum']['epel-testing-source']['description'] = 'Extra Packages for Enterprise Linux 6 - Testing - $basearch Source'
|
||||
default['yum']['epel-testing-source']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch'
|
||||
default['yum']['epel-testing-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
default['yum']['epel-testing-source']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-testing-source']['gpgcheck'] = true
|
||||
default['yum']['epel-testing-source']['enabled'] = false
|
||||
default['yum']['epel-testing-source']['managed'] = false
|
||||
```
|
||||
|
||||
Recipes
|
||||
-------
|
||||
* default - Walks through node attributes and feeds a yum_resource
|
||||
parameters. The following is an example a resource generated by the
|
||||
recipe during compilation.
|
||||
|
||||
```ruby
|
||||
yum_repository 'epel' do
|
||||
mirrorlist 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch'
|
||||
description 'Extra Packages for Enterprise Linux 5 - $basearch'
|
||||
enabled true
|
||||
gpgcheck true
|
||||
gpgkey 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
end
|
||||
```
|
||||
|
||||
Usage Example
|
||||
-------------
|
||||
To disable the epel repository through a Role or Environment definition
|
||||
|
||||
```
|
||||
default_attributes(
|
||||
:yum => {
|
||||
:epel => {
|
||||
:enabled => {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
Uncommonly used repositoryids are not managed by default. This is
|
||||
speeds up integration testing pipelines by avoiding yum-cache builds
|
||||
that nobody cares about. To enable the epel-testing repository with a
|
||||
wrapper cookbook, place the following in a recipe:
|
||||
|
||||
```
|
||||
node.default['yum']['epel-testing']['enabled'] = true
|
||||
node.default['yum']['epel-testing']['managed'] = true
|
||||
include_recipe 'yum-epel'
|
||||
```
|
||||
|
||||
More Examples
|
||||
-------------
|
||||
Point the epel repositories at an internally hosted server.
|
||||
|
||||
```
|
||||
node.default['yum']['epel']['enabled'] = true
|
||||
node.default['yum']['epel']['mirrorlist'] = nil
|
||||
node.default['yum']['epel']['baseurl'] = 'https://internal.example.com/centos/6/os/x86_64'
|
||||
node.default['yum']['epel']['sslverify'] = false
|
||||
|
||||
include_recipe 'yum-epel'
|
||||
```
|
||||
|
||||
License & Authors
|
||||
-----------------
|
||||
- Author:: Sean OMeara (<someara@opscode.com>)
|
||||
|
||||
```text
|
||||
Copyright:: 2011-2013 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.
|
||||
```
|
||||
1
cookbooks/yum-epel/attributes/default.rb
Normal file
1
cookbooks/yum-epel/attributes/default.rb
Normal file
@@ -0,0 +1 @@
|
||||
default['yum-epel']['repositories'] = %w(epel epel-debuginfo epel-source epel-testing epel-testing-debuginfo epel-testing-source)
|
||||
28
cookbooks/yum-epel/attributes/epel-debuginfo.rb
Normal file
28
cookbooks/yum-epel/attributes/epel-debuginfo.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
default['yum']['epel-debuginfo']['repositoryid'] = 'epel-debuginfo'
|
||||
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
default['yum']['epel-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel-debuginfo']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
else
|
||||
case node['platform_version'].to_i
|
||||
when 5
|
||||
default['yum']['epel-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 5 - $basearch - Debug'
|
||||
default['yum']['epel-debuginfo']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch'
|
||||
default['yum']['epel-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
when 6
|
||||
default['yum']['epel-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch - Debug'
|
||||
default['yum']['epel-debuginfo']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch'
|
||||
default['yum']['epel-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
when 7
|
||||
default['yum']['epel-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 7 - $basearch - Debug'
|
||||
default['yum']['epel-debuginfo']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch'
|
||||
default['yum']['epel-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
|
||||
end
|
||||
end
|
||||
|
||||
default['yum']['epel-debuginfo']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-debuginfo']['gpgcheck'] = true
|
||||
default['yum']['epel-debuginfo']['enabled'] = false
|
||||
default['yum']['epel-debuginfo']['managed'] = false
|
||||
28
cookbooks/yum-epel/attributes/epel-source.rb
Normal file
28
cookbooks/yum-epel/attributes/epel-source.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
default['yum']['epel-source']['repositoryid'] = 'epel-source'
|
||||
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
default['yum']['epel-source']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
else
|
||||
case node['platform_version'].to_i
|
||||
when 5
|
||||
default['yum']['epel-source']['description'] = 'Extra Packages for Enterprise Linux 5 - $basearch - Source'
|
||||
default['yum']['epel-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch'
|
||||
default['yum']['epel-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
when 6
|
||||
default['yum']['epel-source']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch - Source'
|
||||
default['yum']['epel-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-6&arch=$basearch'
|
||||
default['yum']['epel-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
when 7
|
||||
default['yum']['epel-source']['description'] = 'Extra Packages for Enterprise Linux 7 - $basearch - Source'
|
||||
default['yum']['epel-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-7&arch=$basearch'
|
||||
default['yum']['epel-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
|
||||
end
|
||||
end
|
||||
|
||||
default['yum']['epel-source']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-source']['gpgcheck'] = true
|
||||
default['yum']['epel-source']['enabled'] = false
|
||||
default['yum']['epel-source']['managed'] = false
|
||||
28
cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb
Normal file
28
cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
default['yum']['epel-testing-debuginfo']['repositoryid'] = 'epel-testing-debuginfo'
|
||||
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
default['yum']['epel-testing-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel-testing-debuginfo']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel-testing-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
else
|
||||
case node['platform_version'].to_i
|
||||
when 5
|
||||
default['yum']['epel-testing-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 5 - Testing - $basearch Debug'
|
||||
default['yum']['epel-testing-debuginfo']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel5&arch=$basearch'
|
||||
default['yum']['epel-testing-debuginfo']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
when 6
|
||||
default['yum']['epel-testing-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 6 - Testing - $basearch Debug'
|
||||
default['yum']['epel-testing-debuginfo']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel6&arch=$basearch'
|
||||
default['yum']['epel-testing-debuginfo']['gpgkey'] = 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
when 7
|
||||
default['yum']['epel-testing-debuginfo']['description'] = 'Extra Packages for Enterprise Linux 7 - Testing - $basearch Debug'
|
||||
default['yum']['epel-testing-debuginfo']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel7&arch=$basearch'
|
||||
default['yum']['epel-testing-debuginfo']['gpgkey'] = 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
|
||||
end
|
||||
end
|
||||
|
||||
default['yum']['epel-testing-debuginfo']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-testing-debuginfo']['gpgcheck'] = true
|
||||
default['yum']['epel-testing-debuginfo']['enabled'] = false
|
||||
default['yum']['epel-testing-debuginfo']['managed'] = false
|
||||
28
cookbooks/yum-epel/attributes/epel-testing-source.rb
Normal file
28
cookbooks/yum-epel/attributes/epel-testing-source.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
default['yum']['epel-testing-source']['repositoryid'] = 'epel-testing-source'
|
||||
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
default['yum']['epel-testing-source']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel-testing-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel-testing-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
else
|
||||
case node['platform_version'].to_i
|
||||
when 5
|
||||
default['yum']['epel-testing-source']['description'] = 'Extra Packages for Enterprise Linux 5 - Testing - $basearch Source'
|
||||
default['yum']['epel-testing-source']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel5&arch=$basearch'
|
||||
default['yum']['epel-testing-source']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
when 6
|
||||
default['yum']['epel-testing-source']['description'] = 'Extra Packages for Enterprise Linux 6 - Testing - $basearch Source'
|
||||
default['yum']['epel-testing-source']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel6&arch=$basearch'
|
||||
default['yum']['epel-testing-source']['gpgkey'] = 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
when 7
|
||||
default['yum']['epel-testing-source']['description'] = 'Extra Packages for Enterprise Linux 7 - Testing - $basearch Source'
|
||||
default['yum']['epel-testing-source']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel7&arch=$basearch'
|
||||
default['yum']['epel-testing-source']['gpgkey'] = 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
|
||||
end
|
||||
end
|
||||
|
||||
default['yum']['epel-testing-source']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-testing-source']['gpgcheck'] = true
|
||||
default['yum']['epel-testing-source']['enabled'] = false
|
||||
default['yum']['epel-testing-source']['managed'] = false
|
||||
28
cookbooks/yum-epel/attributes/epel-testing.rb
Normal file
28
cookbooks/yum-epel/attributes/epel-testing.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
default['yum']['epel-testing']['repositoryid'] = 'epel-testing'
|
||||
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
default['yum']['epel-testing']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel-testing']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel-testing']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
else
|
||||
case node['platform_version'].to_i
|
||||
when 5
|
||||
default['yum']['epel-testing']['description'] = 'Extra Packages for Enterprise Linux 5 - Testing - $basearch'
|
||||
default['yum']['epel-testing']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=$basearch'
|
||||
default['yum']['epel-testing']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
when 6
|
||||
default['yum']['epel-testing']['description'] = 'Extra Packages for Enterprise Linux 6 - Testing - $basearch'
|
||||
default['yum']['epel-testing']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-epel6&arch=$basearch'
|
||||
default['yum']['epel-testing']['gpgkey'] = 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
when 7
|
||||
default['yum']['epel-testing']['description'] = 'Extra Packages for Enterprise Linux 7 - Testing - $basearch'
|
||||
default['yum']['epel-testing']['mirrorlist'] = 'https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch'
|
||||
default['yum']['epel-testing']['gpgkey'] = 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
|
||||
end
|
||||
end
|
||||
|
||||
default['yum']['epel-testing']['failovermethod'] = 'priority'
|
||||
default['yum']['epel-testing']['gpgcheck'] = true
|
||||
default['yum']['epel-testing']['enabled'] = false
|
||||
default['yum']['epel-testing']['managed'] = false
|
||||
28
cookbooks/yum-epel/attributes/epel.rb
Normal file
28
cookbooks/yum-epel/attributes/epel.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
default['yum']['epel']['repositoryid'] = 'epel'
|
||||
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
default['yum']['epel']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
else
|
||||
case node['platform_version'].to_i
|
||||
when 5
|
||||
default['yum']['epel']['description'] = 'Extra Packages for Enterprise Linux 5 - $basearch'
|
||||
default['yum']['epel']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch'
|
||||
default['yum']['epel']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL'
|
||||
when 6
|
||||
default['yum']['epel']['description'] = 'Extra Packages for Enterprise Linux 6 - $basearch'
|
||||
default['yum']['epel']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch'
|
||||
default['yum']['epel']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6'
|
||||
when 7
|
||||
default['yum']['epel']['description'] = 'Extra Packages for Enterprise Linux 7 - $basearch'
|
||||
default['yum']['epel']['mirrorlist'] = 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=$basearch'
|
||||
default['yum']['epel']['gpgkey'] = 'http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7'
|
||||
end
|
||||
end
|
||||
|
||||
default['yum']['epel']['failovermethod'] = 'priority'
|
||||
default['yum']['epel']['gpgcheck'] = true
|
||||
default['yum']['epel']['enabled'] = true
|
||||
default['yum']['epel']['managed'] = true
|
||||
34
cookbooks/yum-epel/metadata.json
Normal file
34
cookbooks/yum-epel/metadata.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "yum-epel",
|
||||
"version": "0.6.0",
|
||||
"description": "Installs/Configures yum-epel",
|
||||
"long_description": "",
|
||||
"maintainer": "Chef",
|
||||
"maintainer_email": "Sean OMeara <someara@getchef.com>",
|
||||
"license": "Apache 2.0",
|
||||
"platforms": {
|
||||
"redhat": ">= 0.0.0",
|
||||
"centos": ">= 0.0.0",
|
||||
"scientific": ">= 0.0.0",
|
||||
"amazon": ">= 0.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"yum": "~> 3.0"
|
||||
},
|
||||
"recommendations": {
|
||||
},
|
||||
"suggestions": {
|
||||
},
|
||||
"conflicting": {
|
||||
},
|
||||
"providing": {
|
||||
},
|
||||
"replacing": {
|
||||
},
|
||||
"attributes": {
|
||||
},
|
||||
"groupings": {
|
||||
},
|
||||
"recipes": {
|
||||
}
|
||||
}
|
||||
61
cookbooks/yum-epel/recipes/default.rb
Normal file
61
cookbooks/yum-epel/recipes/default.rb
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# Author:: Sean OMeara (<someara@getchef.com>)
|
||||
# Recipe:: yum-epel::default
|
||||
#
|
||||
# Copyright 2013, Chef
|
||||
#
|
||||
# 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.
|
||||
|
||||
node['yum-epel']['repositories'].each do |repo|
|
||||
|
||||
if node['yum'][repo]['managed']
|
||||
yum_repository repo do
|
||||
baseurl node['yum'][repo]['baseurl']
|
||||
cost node['yum'][repo]['cost']
|
||||
description node['yum'][repo]['description']
|
||||
enabled node['yum'][repo]['enabled']
|
||||
enablegroups node['yum'][repo]['enablegroups']
|
||||
exclude node['yum'][repo]['exclude']
|
||||
failovermethod node['yum'][repo]['failovermethod']
|
||||
fastestmirror_enabled node['yum'][repo]['fastestmirror_enabled']
|
||||
gpgcheck node['yum'][repo]['gpgcheck']
|
||||
gpgkey node['yum'][repo]['gpgkey']
|
||||
http_caching node['yum'][repo]['http_caching']
|
||||
include_config node['yum'][repo]['include_config']
|
||||
includepkgs node['yum'][repo]['includepkgs']
|
||||
keepalive node['yum'][repo]['keepalive']
|
||||
max_retries node['yum'][repo]['max_retries']
|
||||
metadata_expire node['yum'][repo]['metadata_expire']
|
||||
mirror_expire node['yum'][repo]['mirror_expire']
|
||||
mirrorlist node['yum'][repo]['mirrorlist']
|
||||
mirrorlist_expire node['yum'][repo]['mirrorlist_expire']
|
||||
password node['yum'][repo]['password']
|
||||
priority node['yum'][repo]['priority']
|
||||
proxy node['yum'][repo]['proxy']
|
||||
proxy_username node['yum'][repo]['proxy_username']
|
||||
proxy_password node['yum'][repo]['proxy_password']
|
||||
report_instanceid node['yum'][repo]['report_instanceid']
|
||||
repositoryid node['yum'][repo]['repositoryid']
|
||||
skip_if_unavailable node['yum'][repo]['skip_if_unavailable']
|
||||
source node['yum'][repo]['source']
|
||||
sslcacert node['yum'][repo]['sslcacert']
|
||||
sslclientcert node['yum'][repo]['sslclientcert']
|
||||
sslclientkey node['yum'][repo]['sslclientkey']
|
||||
sslverify node['yum'][repo]['sslverify']
|
||||
timeout node['yum'][repo]['timeout']
|
||||
username node['yum'][repo]['username']
|
||||
|
||||
action :create
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user