Sha256: 2dae54b6d0a50777836a3fe6a01362f4fcc4eb8c5a38f20d541a006e9076fa66
Contents?: true
Size: 638 Bytes
Versions: 175
Compression:
Stored size: 638 Bytes
Contents
class Specinfra::Helper::DetectOs::Coreos < Specinfra::Helper::DetectOs def detect if run_command('ls /etc/coreos/update.conf').success? distro = nil release = nil lsb_release = run_command("cat /etc/lsb-release") if lsb_release.success? lsb_release.stdout.each_line do |line| distro = line.split('=').last.strip if line =~ /^DISTRIB_ID=/ release = line.split('=').last.strip if line =~ /^DISTRIB_RELEASE=/ end end distro ||= 'coreos' release ||= nil { :family => distro.gsub(/[^[:alnum:]]/, '').downcase, :release => release } end end end
Version data entries
175 entries across 175 versions & 3 rubygems