Class: Specinfra::Command::Redhat::Base::Host

Inherits:
Base::Host show all
Defined in:
lib/specinfra/command/redhat/base/host.rb

Direct Known Subclasses

V7::Host

Class Method Summary collapse

Methods inherited from Base::Host

check_is_reachable, check_is_resolvable, get_ipaddress, get_ipv4_address, get_ipv6_address

Methods inherited from Base

escape

Class Method Details

.create(os_info = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/specinfra/command/redhat/base/host.rb', line 3

def create(os_info=nil)
  release = (os_info || os)[:release].to_i
  # Dirty hack for Amazon Linux
  if release < 7 || release > 2000
    self
  else
    Specinfra::Command::Redhat::V7::Host
  end
end