Forge Home

yumrepos

Adds yumrepos from parameters

21,184 downloads

20,124 latest version

3.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.0.3 (latest)
  • 0.0.2
  • 0.0.1
released Jul 29th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'gbrown-yumrepos', '0.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add gbrown-yumrepos
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install gbrown-yumrepos --version 0.0.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

gbrown/yumrepos — version 0.0.3 Jul 29th 2014

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