Module: VagrantPlugins::ProxyConf::Cap::Linux::YumProxyConf

Defined in:
lib/vagrant-proxyconf/cap/linux/yum_proxy_conf.rb

Overview

Capability for Yum proxy configuration

Class Method Summary collapse

Class Method Details

.yum_proxy_conf(machine) ⇒ String

Returns the path to the configuration file.

Returns:

  • (String)

    the path to the configuration file



8
9
10
11
12
13
14
# File 'lib/vagrant-proxyconf/cap/linux/yum_proxy_conf.rb', line 8

def self.yum_proxy_conf(machine)
  machine.communicate.tap do |comm|
    return '/etc/yum.conf' if comm.test('[ -f /etc/yum.conf ]')
    return '/etc/yum/yum.conf' if comm.test('[ -f /etc/yum/yum.conf ]')
  end
  nil
end