Sha256: 6bca3c6e1c528c6812559cb34fcba8935ac3ad66a3f581ba06a7e469c34e404a
Contents?: true
Size: 1.05 KB
Versions: 24
Compression:
Stored size: 1.05 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../utilities') Capistrano::Configuration.instance(true).load do namespace :yum do desc "Updates all installed packages on yum package system" task :updates do utilities.yum_update end desc "Installs a specified yum package" task :install do yum_pkg_name = utilities.ask "Enter name of the package(s) you wish to install:" raise "Please specify yum_pkg_name" if yum_pkg_name == '' logger.info "Updating packages..." sudo "yum update" logger.info "Installing #{yum_pkg_name}..." utilities.yum_install yum_pkg_name end desc "Removes a specified yum package" task :remove do yum_pkg_name = utilities.ask "Enter name of the package(s) you wish to remove:" raise "Please specify yum_pkg_name" if yum_pkg_name == '' logger.info "Updating packages..." sudo "yum update" logger.info "Removing #{yum_pkg_name}..." utilities.sudo_with_input "yum erase -y #{yum_pkg_name}", /^Do you want to continue\?/ end end end
Version data entries
24 entries across 24 versions & 1 rubygems