Chef Cookbook: NUX Yum Repository
attributes | ||
recipes | ||
Berksfile | ||
Berksfile.lock | ||
CHANGELOG.md | ||
metadata.rb | ||
README.md |
yum-nux Cookbook
The yum-nux cookbook takes over management of the default repositoryids that ship with CentOS systems. It allows attribute manipulation of nux-dextop
, nux-dextop-testing
Requirements
Platforms
- RHEL/CentOS and derivatives
Chef
- Chef 11+
Cookbooks
- yum version 3.2.0 or higher
- yum-epel
Attributes
The following attributes are set by default
default['yum']['nux-dextop']['repositoryid'] = 'nux-dextop'
default['yum']['nux-dextop']['enabled'] = true
default['yum']['nux-dextop']['managed'] = true
default['yum']['nux-dextop']['gpgkey'] = 'http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro'
default['yum']['nux-dextop']['gpgcheck'] = true
default['yum']['nux-dextop']['description'] = 'Nux Desktop Community Packages for Enterprise Linux 6 - $basearch'
default['yum']['nux-dextop']['baseurl'] = 'http://li.nux.ro/download/nux/dextop/el6/$basearch/ http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el6/$basearch/'
default['yum']['nux-dextop-testing']['repositoryid'] = 'nux-dextop-testing'
default['yum']['nux-dextop-testing']['enabled'] = false
default['yum']['nux-dextop-testing']['managed'] = false
default['yum']['nux-dextop-testing']['gpgkey'] = 'http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro'
default['yum']['nux-dextop-testing']['gpgcheck'] = true
default['yum']['nux-dextop-testing']['description'] = 'Nux Desktop Testing Packages for Enterprise Linux 6 - $basearch'
default['yum']['nux-dextop-testing']['baseurl'] = 'http://li.nux.ro/download/nux/dextop-testing/el6/$basearch/'
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.
yum_repository 'nux-dextop' do
baseurl 'http://li.nux.ro/download/nux/dextop/el6/$basearch/ http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el6/$basearch/'
description 'Nux Desktop Community Packages for Enterprise Linux 6 - $basearch'
enabled true
gpgcheck true
gpgkey 'http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro'
end
Usage Example
To disable the nux-dextop
repository through a Role or Environment definition
default_attributes(
'yum' => {
'nux-dextop' => {
'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 nux-dextop-testing
repository with a wrapper cookbook, place the following in a recipe:
node.default['yum']['nux-dextop-tesing']['managed'] = true
node.default['yum']['nux-dextop-tesing']['enabled'] = true
include_recipe 'yum-nux'
More Examples
Point the base and debuginfo repositories at an internally hosted server.
node.default['yum']['nux-dextop']['enabled'] = true
node.default['yum']['nux-dextop']['baseurl'] = 'https://internal.example.com/centos/6/os/x86_64'
node.default['yum']['nux-dextop']['sslverify'] = false
node.default['yum']['nux-dextop-testing']['enabled'] = true
node.default['yum']['nux-dextop-testing']['baseurl'] = 'https://internal.example.com/centos/6/updates/x86_64'
node.default['yum']['nux-dextop-testing']['sslverify'] = false
include_recipe 'yum-nux'
License & Authors
Author: Eric Renfro (psi-jack@linux-help.org)
Copyright: 2016, Linux-Help.org.
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.