methods/ks_client.rb
# Populat a list of additional packages to install
Populat a list of additional packages to install
Populat a list of additional packages to install
def populate_ks_pkg_list(options)
  pkg_list = []
  if options['service'].to_s.match(/centos|fedora|rhel|sl_|oel/)
    if not options['service'].to_s.match(/fedora/)
      pkg_list.push("@base")
    end
    pkg_list.push("@core")
    if options['service'].to_s.match(/[a-z]_6/)
      pkg_list.push("@console-internet")
      pkg_list.push("@system-admin-tools")
    end
    if not options['service'].to_s.match(/sl_6|[a-z]_5|fedora/)
      pkg_list.push("@network-file-system-client")
    end
    if options['service'].to_s.match(/centos_[6,7]|fedora|sl_[6,7]/)
      if not options['service'].to_s.match(/fedora_2[3-9]|centos_6/)
        pkg_list.push("redhat-lsb-core")
        if not options['service'].to_s.match(/rhel_[6,7]|oel_[6,7]|centos_7/)
          pkg_list.push("augeas")
          pkg_list.push("tk")
        end
      end
      if not options['service'].to_s.match(/fedora|_[6,7,8]/)
        pkg_list.push("ruby")
        pkg_list.push("ruby-irb")
        pkg_list.push("rubygems")
        pkg_list.push("ruby-rdoc")
        pkg_list.push("ruby-devel")
      end
      if not options['service'].to_s.match(/centos_6/)
        pkg_list.push("augeas-libs")
        pkg_list.push("ruby-libs")
      end
    end
    if not options['service'].to_s.match(/fedora|el_[7,8]|centos_[6,7,8]/)
      pkg_list.push("grub")
      pkg_list.push("libselinux-ruby")
    end
    if options['service'].to_s.match(/el_[7,8]|centos_[7,8]/)
      pkg_list.push("iscsi-initiator-utils")
    end
    if not options['service'].to_s.match(/centos_6/)
      pkg_list.push("e2fsprogs")
      pkg_list.push("lvm2")
    end
    if not options['service'].to_s.match(/fedora/)
      pkg_list.push("kernel-devel")
      if not options['service'].to_s.match(/centos_6/)
        pkg_list.push("automake")
        pkg_list.push("autoconf")
        pkg_list.push("lftp")
        pkg_list.push("avahi")
      end
    end
    pkg_list.push("kernel-headers")
    pkg_list.push("dos2unix")
    pkg_list.push("unix2dos")
    if not options['service'].to_s.match(/fedora_2[4-9]|centos_6/)
      pkg_list.push("zlib-devel")
    end
    if not options['service'].to_s.match(/fedora/)
      if not options['service'].to_s.match(/centos_6/)
        pkg_list.push("libgpg-error-devel")
        pkg_list.push("libxml2-devel")
        pkg_list.push("libgcrypt-devel")
        pkg_list.push("xz-devel")
        pkg_list.push("libxslt-devel")
        pkg_list.push("libstdc++-devel")
      end
      if not options['service'].to_s.match(/rhel_5|fedora|centos_6/)
        pkg_list.push("perl-TermReadKey")
        pkg_list.push("git")
        pkg_list.push("perl-Git")
      end
      pkg_list.push("gcc")
      pkg_list.push("gcc-c++")
      if not options['service'].to_s.match(/centos_|el_8/)
        pkg_list.push("dhcp")
      end
      pkg_list.push("xinetd")
      pkg_list.push("tftp-server")
    end
    if not options['service'].to_s.match(/el_|centos_/)
      pkg_list.push("libgnome-keyring")
    end
    if not options['service'].to_s.match(/rhel_5/)
      pkg_list.push("perl-Error")
    end
    pkg_list.push("httpd")
    if options['service'].to_s.match(/fedora/)
      pkg_list.push("net-tools")
      pkg_list.push("bind-utils")
    end
    if not options['service'].to_s.match(/fedora|el_8|centos_8/)
      pkg_list.push("ntp")
    end
    pkg_list.push("rsync")
    if options['service'].to_s.match(/sl_6/)
      pkg_list.push("-samba-client")
    end
  end
  return pkg_list
end
def populate_ks_pkg_list ( options ) pkg_list = [ ] if options [ 'service' ] . to_s . match ( / centos|fedora|rhel|sl_|oel / ) if not options [ 'service' ] . to_s . match ( / fedora / ) pkg_list . push ( "@base" ) end pkg_list . push ( "@core" ) if options [ 'service' ] . to_s . match ( / [a-z]_6 / ) pkg_list . push ( "@console-internet" ) pkg_list . push ( "@system-admin-tools" ) end if not options [ 'service' ] . to_s . match ( / sl_6|[a-z]_5|fedora / ) pkg_list . push ( "@network-file-system-client" ) end if options [ 'service' ] . to_s . match ( / centos_[6,7]|fedora|sl_[6,7] / ) if not options [ 'service' ] . to_s . match ( / fedora_2[3-9]|centos_6 / ) pkg_list . push ( "redhat-lsb-core" ) if not options [ 'service' ] . to_s . match ( / rhel_[6,7]|oel_[6,7]|centos_7 / ) pkg_list . push ( "augeas" ) pkg_list . push ( "tk" ) end end if not options [ 'service' ] . to_s . match ( / fedora|_[6,7,8] / ) pkg_list . push ( "ruby" ) pkg_list . push ( "ruby-irb" ) pkg_list . push ( "rubygems" ) pkg_list . push ( "ruby-rdoc" ) pkg_list . push ( "ruby-devel" ) end if not options [ 'service' ] . to_s . match ( / centos_6 / ) pkg_list . push ( "augeas-libs" ) pkg_list . push ( "ruby-libs" ) end end if not options [ 'service' ] . to_s . match ( / fedora|el_[7,8]|centos_[6,7,8] / ) pkg_list . push ( "grub" ) pkg_list . push ( "libselinux-ruby" ) end if options [ 'service' ] . to_s . match ( / el_[7,8]|centos_[7,8] / ) pkg_list . push ( "iscsi-initiator-utils" ) end if not options [ 'service' ] . to_s . match ( / centos_6 / ) pkg_list . push ( "e2fsprogs" ) pkg_list . push ( "lvm2" ) end if not options [ 'service' ] . to_s . match ( / fedora / ) pkg_list . push ( "kernel-devel" ) if not options [ 'service' ] . to_s . match ( / centos_6 / ) pkg_list . push ( "automake" ) pkg_list . push ( "autoconf" ) pkg_list . push ( "lftp" ) pkg_list . push ( "avahi" ) end end pkg_list . push ( "kernel-headers" ) pkg_list . push ( "dos2unix" ) pkg_list . push ( "unix2dos" ) if not options [ 'service' ] . to_s . match ( / fedora_2[4-9]|centos_6 / ) pkg_list . push ( "zlib-devel" ) end if not options [ 'service' ] . to_s . match ( / fedora / ) if not options [ 'service' ] . to_s . match ( / centos_6 / ) pkg_list . push ( "libgpg-error-devel" ) pkg_list . push ( "libxml2-devel" ) pkg_list . push ( "libgcrypt-devel" ) pkg_list . push ( "xz-devel" ) pkg_list . push ( "libxslt-devel" ) pkg_list . push ( "libstdc++-devel" ) end if not options [ 'service' ] . to_s . match ( / rhel_5|fedora|centos_6 / ) pkg_list . push ( "perl-TermReadKey" ) pkg_list . push ( "git" ) pkg_list . push ( "perl-Git" ) end pkg_list . push ( "gcc" ) pkg_list . push ( "gcc-c++" ) if not options [ 'service' ] . to_s . match ( / centos_|el_8 / ) pkg_list . push ( "dhcp" ) end pkg_list . push ( "xinetd" ) pkg_list . push ( "tftp-server" ) end if not options [ 'service' ] . to_s . match ( / el_|centos_ / ) pkg_list . push ( "libgnome-keyring" ) end if not options [ 'service' ] . to_s . match ( / rhel_5 / ) pkg_list . push ( "perl-Error" ) end pkg_list . push ( "httpd" ) if options [ 'service' ] . to_s . match ( / fedora / ) pkg_list . push ( "net-tools" ) pkg_list . push ( "bind-utils" ) end if not options [ 'service' ] . to_s . match ( / fedora|el_8|centos_8 / ) pkg_list . push ( "ntp" ) end pkg_list . push ( "rsync" ) if options [ 'service' ] . to_s . match ( / sl_6 / ) pkg_list . push ( "-samba-client" ) end end return pkg_list end
Populat a list of additional packages to install
Populat a list of additional packages to install
options
<not_specific>