yum: Added support for setting yum http proxy

This commit is contained in:
Ossi Salmi 2013-06-04 21:44:59 +03:00
parent 4e6a3ab97e
commit 3997cfb5af

View file

@ -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",
}
}
}