fad6bbf6a0
Check if yum is really present on a 'redhat' machine. Only if it is, enable the Yum bucket. The same for DNF since older versions of CentOS and Fedora do not ship DNF.
18 lines
422 B
Ruby
18 lines
422 B
Ruby
module VagrantPlugins
|
|
module Cachier
|
|
module Cap
|
|
module RedHat
|
|
module DnfCacheDir
|
|
def self.dnf_cache_dir(machine)
|
|
dnf_cache_dir = nil
|
|
machine.communicate.tap do |comm|
|
|
return unless comm.test('which dnf')
|
|
dnf_cache_dir = '/var/cache/dnf'
|
|
end
|
|
return dnf_cache_dir
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|