Sha256: 25b0c5676268304676d3dbd8024b87507183c006b75414f567ba6d278ab4ec0a
Contents?: true
Size: 855 Bytes
Versions: 14
Compression:
Stored size: 855 Bytes
Contents
module SystemProvisioning module EL def install_epel_release rpm_install( 'epel-release', 'http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm' ) end def install_puppetlabs_release rpm_install( 'puppetlabs-release', 'http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm' ) end def yum_install(*pkgs) pkgs = Array(*pkgs) pkgs.each do |pkg| check_cmd = shell "rpm -q --filesbypkg #{pkg}" if check_cmd.exit_code != 0 shell "yum -y install #{pkg}" end end end def rpm_install(name, install_name = nil) install_name ||= name check_cmd = shell "rpm -q --filesbypkg #{name}" if check_cmd.exit_code != 0 shell "rpm -Uvh #{install_name}" end end end end
Version data entries
14 entries across 14 versions & 1 rubygems