Module: Beaker::Utils::Validator
- Defined in:
- lib/beaker/utils/validator.rb
Constant Summary collapse
- PACKAGES =
['curl']
- UNIX_PACKAGES =
['ntpdate']
Class Method Summary collapse
Class Method Details
.validate(hosts, logger) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/beaker/utils/validator.rb', line 7 def self.validate(hosts, logger) hosts.each do |host| PACKAGES.each do |pkg| if not host.check_for_package pkg host.install_package pkg end end if host['platform'] !~ /(windows)|(aix)|(solaris)/ UNIX_PACKAGES.each do |pkg| if not host.check_for_package pkg host.install_package pkg end end end end rescue => e report_and_raise(logger, e, "validate") end |