Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

g0xA52A2A/yumrepos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yumrepos puppet module

About

I was sick of having modules for various repos and module dependencies for yet another EPEL module.

This has a dependency on the puppetlabs/stdlib for validation checks.

Simply throw the $repos parameter a nested hash of repos and stop writing yumrepo modules.

If the $heria_hash parameter is true values for $repos across all hierarchies are used so repos can be defined at multiple levels. This allows for a base set of repos to be defined at a low level of the hierarchy and more specific repos to be defined further up the hierarchy closer to what is likely more relevant definitions.

There is also a $defaults parameter intended to minimise boiler plate. This enables default attributes to be set once and applied for all puppet defined yumrepos. In this module this is set to ensure the repo is enabled. Handy if you have to proxy all your repos or something for example.

If the attribute is defined in both $repos and $defaults the value in $repos takes precedence.

The $purge parameter takes a boolean, if true all yumrepos and rpm-gpg keys will be purged unless they are provided by puppet. This defaults to false.

Usage

Include the class

include yumrepos

Pass the class a nested hash of repos

$repos = {
  epel => {
  descr     => 'Extra Packages for Enterprise Linux 6 - x86_64',
  baseurl   => 'http://download.fedoraproject.org/pub/epel/6/$basearch',
  gpgkey    => '/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6',
  priority  => '10',
  }
  myrepo => {
  descr     => 'Local mirror of Foo',
  baseurl   => 'http://foo.server.com/6/$basearch',
  gpgkey    => '/etc/pki/rpm-gpg/RPM-GPG-KEY-foo',
  priority  => '10',
  }
}

Set all repos to check gpgkeys

$defaults = {
  ensure    => present,
  enabled   => true,
  gpgcheck  => true,
}

You can provide keys by dropping them into the files directory of this module

About

A puppet module for installing yumrepos

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages