example42/puppet-yum — pull request #27 by lamawithonel (2013-10-18 19:10:46+00:00)
Title: Add $mirror_url parameter to a few common repos

This adds the parameter $mirror_url to the repo classes for CentOS 6, CentOS 5, Scientific Linx and EPEL. It's intended to allow the use of local mirrors through Puppet 3.x databinding.

The parameter takes a "clean" URL to the base of the mirroring infrastructure for each class, e.g., http://msync.centos.org/centos for CentOS. After checking it against a regex for clean URLs with stdlib's validatere(), it interpolates with the known directory structure to create `basedir` variables for each repo. The `failovermethod` parameter is set to `priority` for each repo to avoid round-robin behavior with the existing `mirrorlist`.