Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

yum-amazon (24) Versions 2.0.2

Installs and configures the Amazon linux yum repository

Policyfile
Berkshelf
Knife
cookbook 'yum-amazon', '= 2.0.2', :supermarket
cookbook 'yum-amazon', '= 2.0.2'
knife supermarket install yum-amazon
knife supermarket download yum-amazon
README
Dependencies
Changelog
Quality 100%

yum-amazon Cookbook

Build Status Cookbook Version

The yum-amazon cookbook takes over management of the default repositoryids that ship with Amazon Linux systems. It allows attribute manipulation of amzn-main, amzn-main-debuginfo, amzn-nosrc, amzn-updates, amzn-updates-debuginfo, amzn-preview, and amzn-preview-debuginfo

Requirements

Platforms

  • Amazon Linux

Chef

  • Chef 12.1+

Cookbooks

  • compat_resource

Attributes

The following attributes are set by default

default['yum']['amzn-main']['description'] = 'amzn-main-Base'
default['yum']['amzn-main']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/main/mirror.list'
default['yum']['amzn-main']['mirror_expire'] = '300'
default['yum']['amzn-main']['metadata_expire'] = '300'
default['yum']['amzn-main']['priority'] = '10'
default['yum']['amzn-main']['failovermethod'] = 'priority'
default['yum']['amzn-main']['fastestmirror_enabled'] = false
default['yum']['amzn-main']['gpgcheck'] = true
default['yum']['amzn-main']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-main']['enabled'] = true
default['yum']['amzn-main']['managed'] = true
default['yum']['amzn-main']['max_retries'] = '5'
default['yum']['amzn-main']['timeout'] = '10'
default['yum']['amzn-main']['report_instanceid'] = true
default['yum']['amzn-main-debuginfo']['repositoryid'] = 'amzn-main-debuginfo'
default['yum']['amzn-main-debuginfo']['description'] = 'amzn-main-debuginfo'
default['yum']['amzn-main-debuginfo']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/main/debuginfo/mirror.list'
default['yum']['amzn-main-debuginfo']['mirror_expire'] = '300'
default['yum']['amzn-main-debuginfo']['metadata_expire'] = '300'
default['yum']['amzn-main-debuginfo']['priority'] = '10'
default['yum']['amzn-main-debuginfo']['failovermethod'] = 'priority'
default['yum']['amzn-main-debuginfo']['fastestmirror_enabled'] = false
default['yum']['amzn-main-debuginfo']['gpgcheck'] = true
default['yum']['amzn-main-debuginfo']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-main-debuginfo']['enabled'] = false
default['yum']['amzn-main-debuginfo']['managed'] = false
default['yum']['amzn-main-debuginfo']['max_retries'] = '5'
default['yum']['amzn-main-debuginfo']['timeout'] = '10'
default['yum']['amzn-main-debuginfo']['report_instanceid'] = true
default['yum']['amzn-nosrc']['repositoryid'] = 'amzn-nosrc'
default['yum']['amzn-nosrc']['description'] = 'amzn-nosrc-Base'
default['yum']['amzn-nosrc']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/nosrc/mirror.list'
default['yum']['amzn-nosrc']['mirror_expire'] = '300'
default['yum']['amzn-nosrc']['metadata_expire'] = '300'
default['yum']['amzn-nosrc']['priority'] = '10'
default['yum']['amzn-nosrc']['failovermethod'] = 'priority'
default['yum']['amzn-nosrc']['fastestmirror_enabled'] = false
default['yum']['amzn-nosrc']['gpgcheck'] = false
default['yum']['amzn-nosrc']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-nosrc']['enabled'] = false
default['yum']['amzn-nosrc']['managed'] = false
default['yum']['amzn-nosrc']['max_retries'] = '5'
default['yum']['amzn-nosrc']['timeout'] = '10'
default['yum']['amzn-nosrc']['report_instanceid'] = true
default['yum']['amzn-updates']['repositoryid'] = 'amzn-updates'
default['yum']['amzn-updates']['description'] = 'amzn-updates-Base'
default['yum']['amzn-updates']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/updates/mirror.list'
default['yum']['amzn-updates']['mirror_expire'] = '300'
default['yum']['amzn-updates']['metadata_expire'] = '300'
default['yum']['amzn-updates']['priority'] = '10'
default['yum']['amzn-updates']['failovermethod'] = 'priority'
default['yum']['amzn-updates']['fastestmirror_enabled'] = false
default['yum']['amzn-updates']['gpgcheck'] = true
default['yum']['amzn-updates']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-updates']['enabled'] = true
default['yum']['amzn-updates']['managed'] = true
default['yum']['amzn-updates']['max_retries'] = '5'
default['yum']['amzn-updates']['timeout'] = '10'
default['yum']['amzn-updates']['report_instanceid'] = true
default['yum']['amzn-updates-debuginfo']['repositoryid'] = 'amzn-updates-debuginfo'
default['yum']['amzn-updates-debuginfo']['description'] = 'amzn-updates-Base'
default['yum']['amzn-updates-debuginfo']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/updates/debuginfo/mirror.list'
default['yum']['amzn-updates-debuginfo']['mirror_expire'] = '300'
default['yum']['amzn-updates-debuginfo']['metadata_expire'] = '300'
default['yum']['amzn-updates-debuginfo']['priority'] = '10'
default['yum']['amzn-updates-debuginfo']['failovermethod'] = 'priority'
default['yum']['amzn-updates-debuginfo']['fastestmirror_enabled'] = false
default['yum']['amzn-updates-debuginfo']['gpgcheck'] = true
default['yum']['amzn-updates-debuginfo']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-updates-debuginfo']['enabled'] = false
default['yum']['amzn-updates-debuginfo']['managed'] = false
default['yum']['amzn-updates-debuginfo']['max_retries'] = '5'
default['yum']['amzn-updates-debuginfo']['timeout'] = '10'
default['yum']['amzn-updates-debuginfo']['report_instanceid'] = true
default['yum']['amzn-preview']['repositoryid'] = 'amzn-preview'
default['yum']['amzn-preview']['description'] = 'amzn-preview-Base'
default['yum']['amzn-preview']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/preview/mirror.list'
default['yum']['amzn-preview']['mirror_expire'] = '300'
default['yum']['amzn-preview']['metadata_expire'] = '300'
default['yum']['amzn-preview']['priority'] = '10'
default['yum']['amzn-preview']['failovermethod'] = 'priority'
default['yum']['amzn-preview']['fastestmirror_enabled'] = false
default['yum']['amzn-preview']['gpgcheck'] = true
default['yum']['amzn-preview']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-preview']['enabled'] = false
default['yum']['amzn-preview']['managed'] = false
default['yum']['amzn-preview']['max_retries'] = '5'
default['yum']['amzn-preview']['timeout'] = '10'
default['yum']['amzn-preview']['report_instanceid'] = true
default['yum']['amzn-preview-debuginfo']['repositoryid'] = 'amzn-preview-debuginfo'
default['yum']['amzn-preview-debuginfo']['description'] = 'amzn-preview-Base'
default['yum']['amzn-preview-debuginfo']['mirrorlist'] = 'http://repo.us-east-1.amazonaws.com/$releasever/preview/debuginfo/mirror.list'
default['yum']['amzn-preview-debuginfo']['mirror_expire'] = '300'
default['yum']['amzn-preview-debuginfo']['metadata_expire'] = '300'
default['yum']['amzn-preview-debuginfo']['priority'] = '10'
default['yum']['amzn-preview-debuginfo']['failovermethod'] = 'priority'
default['yum']['amzn-preview-debuginfo']['fastestmirror_enabled'] = false
default['yum']['amzn-preview-debuginfo']['gpgcheck'] = true
default['yum']['amzn-preview-debuginfo']['gpgkey'] = 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
default['yum']['amzn-preview-debuginfo']['enabled'] = false
default['yum']['amzn-preview-debuginfo']['managed'] = false
default['yum']['amzn-preview-debuginfo']['max_retries'] = '5'
default['yum']['amzn-preview-debuginfo']['timeout'] = '10'
default['yum']['amzn-preview-debuginfo']['report_instanceid'] = true

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 'amzn-main' do
    mirrorlist 'http://repo.us-east-1.amazonaws.com/$releasever/main/mirror.list'
    description 'amzn-main-Base'
    enabled true
    gpgcheck true
    gpgkey 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-ga'
  end

Usage Example

To disable the amzn-updates repository through a Role or Environment definition

default_attributes(
  :yum => {
    :amzn-updates => {
      :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 amzn-preview repository with a wrapper cookbook, place the following in a recipe:

node.default['yum']['amzn-preview']['managed'] = true
node.default['yum']['amzn-preview']['enabled'] = true

include_recipe 'yum-amazon'

More Examples

Point the base and updates repositories at an internally hosted server.

node.default['yum']['amzn-main']['enabled'] = true
node.default['yum']['amzn-main']['mirrorlist'] = nil
node.default['yum']['amzn-main']['baseurl'] = 'https://internal.example.com/amzn-main/os/x86_64'
node.default['yum']['amzn-main']['sslverify'] = false

include_recipe 'yum-amazon'

License & Authors

Author: Cookbook Engineering Team (cookbooks@chef.io)

Copyright: 2011-2016, Chef Software, 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.

yum-amazon Cookbook CHANGELOG

This file is used to list changes made in each version of the yum-amazon cookbook.

2.0.2 (2017-04-26)

  • Switch from Rake testing to Local Delivery
  • Update apache2 license string

2.0.1 (2016-12-22)

  • Remove extra line
  • Depend on the latest compat_resource cookbook

2.0.0 (2016-11-26)

  • Clarify that we require Chef 12.1 not 12.0
  • Require compat_resource instead of yum

1.0.0 (2016-09-06)

  • Update testing framework
  • Add chef_version metadata
  • Remove support for Chef 11

v0.2.3 (2015-12-01)

  • Fixing if/unless logic in recipe

v0.2.2 (2015-10-28)

  • Fixing Chef 13 deprecation warnings by not passing nils

v0.2.1 (2014-09-22)

  • Merge 0.2.0 changes with 0.1.6 release changes

v0.1.6 (2015-09-21) <-- This came after 0.2.0 since 0.2.0 was not in git and was later merged

  • Update yum depencency from ~3.0 to ~3.2
  • Add supports metadata for Amazon Linux
  • Add source_url and issues_url metadata
  • Add a .foodcritic file
  • Add standard Chef gitignore and chefignore files
  • Move the .kitchen.yml file to .kitchen.cloud.yml and add a standard kitchen.yml for vagrant testing
  • Add the standard chef rubocop config
  • Update Travis to test on modern Ruby versions
  • Update berskfile to 3.X format
  • Update contributing, maintainers, and testing docs
  • Add standard Gemfile with testing and development dependencies
  • Add a Guardfile
  • Add Travis CI and cookbook version badges in the readme
  • Expand the requirements section in the readme
  • Add rakefile for simpler testing

v0.2.0 (2014-02-14)

  • All repos except for the main/updates repos are now set to enabled = false and managed = false. Attributes will need to be set if you'd like to manage these repositories

v0.1.5

  • Guarding against running outside ec2

v0.1.4

Adding CHANGELOG.md

v0.1.0

initial release

Collaborator Number Metric
            

2.0.2 passed this metric

Contributing File Metric
            

2.0.2 passed this metric

Foodcritic Metric
            

2.0.2 passed this metric

License Metric
            

2.0.2 passed this metric

No Binaries Metric
            

2.0.2 passed this metric

Testing File Metric
            

2.0.2 passed this metric

Version Tag Metric
            

2.0.2 passed this metric