From 3997cfb5af35bf3525b6eba9b9a56103ee7a693c Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Tue, 4 Jun 2013 21:44:59 +0300 Subject: [PATCH] yum: Added support for setting yum http proxy --- yum/manifests/init.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/yum/manifests/init.pp b/yum/manifests/init.pp index 8c14388..82bdc88 100644 --- a/yum/manifests/init.pp +++ b/yum/manifests/init.pp @@ -120,6 +120,11 @@ class yum::plugin::priorities { # Common prequisites for yum # +# === Global variables +# +# $yum_proxy: +# URL of HTTP proxy, for example "http://www.example.local:80/". +# class yum::common { case $::operatingsystem { @@ -133,6 +138,19 @@ class yum::common { } } + if $yum_proxy { + augeas { "yum-enable-proxy": + context => "/files/etc/yum.conf/main", + changes => "set proxy ${yum_proxy}", + tag => "bootstrap", + } + augeas { "yum-disable-fastestmirror": + context => "/files/etc/yum/pluginconf.d/fastestmirror.conf/main", + changes => "set enabled 0", + tag => "bootstrap", + } + } + }