From c45f4f149acfcd6b8f926f56688dde21bac9677b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Tue, 18 Jun 2013 15:05:55 +0300 Subject: [PATCH] yum: Changed yum::repo to allow defining both $mirrorlist and $baseurl. If both are defined the $baseurl will be used. --- yum/manifests/init.pp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/yum/manifests/init.pp b/yum/manifests/init.pp index 6812ac2..fb3521c 100644 --- a/yum/manifests/init.pp +++ b/yum/manifests/init.pp @@ -189,7 +189,8 @@ class yum::exclude { # $baseurl: # Base URL for this repository. # $mirrorlist: -# Mirrorlist URL for this repository. +# Mirrorlist URL for this repository. If $baseurl is also set +# this won't have any effect. # $descr: # Repository description. Defaults to $name. # $gpgkey: @@ -218,9 +219,6 @@ define yum::repo($ensure="present", $baseurl="", $mirrorlist="", $descr="", $gpg if !$baseurl and !$mirrorlist { fail("Either \$baseurl or \$mirrorlist needs to be defined for yum::repo") } - if $baseurl and $mirrorlist { - fail("Cannot set both \$baseurl and \$mirrorlist for yum::repo") - } if regsubst($gpgkey, "^(puppet://).*", '\1') == "puppet://" { file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-${name}":