yum: Added support for setting yum http proxy
This commit is contained in:
parent
4e6a3ab97e
commit
3997cfb5af
1 changed files with 18 additions and 0 deletions
|
@ -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",
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue