ohai 16.6.5 → 16.7.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -7
- data/bin/ohai +1 -0
- data/lib/ohai.rb +1 -0
- data/lib/ohai/application.rb +1 -0
- data/lib/ohai/common/dmi.rb +1 -0
- data/lib/ohai/config.rb +1 -0
- data/lib/ohai/dsl.rb +1 -0
- data/lib/ohai/dsl/plugin.rb +1 -0
- data/lib/ohai/dsl/plugin/versionvii.rb +1 -0
- data/lib/ohai/exception.rb +1 -0
- data/lib/ohai/hints.rb +1 -0
- data/lib/ohai/log.rb +1 -0
- data/lib/ohai/mash.rb +1 -0
- data/lib/ohai/mixin/azure_metadata.rb +2 -1
- data/lib/ohai/mixin/chef_utils_wiring.rb +1 -0
- data/lib/ohai/mixin/command.rb +1 -0
- data/lib/ohai/mixin/constant_helper.rb +1 -0
- data/lib/ohai/mixin/dmi_decode.rb +1 -0
- data/lib/ohai/mixin/do_metadata.rb +3 -2
- data/lib/ohai/mixin/ec2_metadata.rb +2 -1
- data/lib/ohai/mixin/gce_metadata.rb +3 -2
- data/lib/ohai/mixin/http_helper.rb +1 -0
- data/lib/ohai/mixin/network_helper.rb +1 -0
- data/lib/ohai/mixin/os.rb +1 -0
- data/lib/ohai/mixin/scaleway_metadata.rb +3 -2
- data/lib/ohai/mixin/seconds_to_human.rb +1 -0
- data/lib/ohai/mixin/shell_out.rb +1 -0
- data/lib/ohai/mixin/softlayer_metadata.rb +2 -1
- data/lib/ohai/mixin/string.rb +1 -0
- data/lib/ohai/mixin/train_helpers.rb +1 -0
- data/lib/ohai/mixin/which.rb +1 -0
- data/lib/ohai/plugin_config.rb +1 -0
- data/lib/ohai/plugins/aix/kernel.rb +1 -0
- data/lib/ohai/plugins/aix/memory.rb +1 -0
- data/lib/ohai/plugins/aix/network.rb +2 -1
- data/lib/ohai/plugins/aix/platform.rb +1 -0
- data/lib/ohai/plugins/aix/uptime.rb +3 -2
- data/lib/ohai/plugins/azure.rb +1 -0
- data/lib/ohai/plugins/bsd/virtualization.rb +1 -0
- data/lib/ohai/plugins/c.rb +1 -0
- data/lib/ohai/plugins/chef.rb +1 -0
- data/lib/ohai/plugins/cloud.rb +1 -0
- data/lib/ohai/plugins/command.rb +1 -0
- data/lib/ohai/plugins/cpu.rb +2 -3
- data/lib/ohai/plugins/darwin/hardware.rb +1 -0
- data/lib/ohai/plugins/darwin/memory.rb +2 -3
- data/lib/ohai/plugins/darwin/network.rb +1 -0
- data/lib/ohai/plugins/darwin/platform.rb +1 -0
- data/lib/ohai/plugins/darwin/virtualization.rb +1 -0
- data/lib/ohai/plugins/digital_ocean.rb +1 -0
- data/lib/ohai/plugins/dmi.rb +1 -0
- data/lib/ohai/plugins/docker.rb +1 -0
- data/lib/ohai/plugins/dragonflybsd/memory.rb +1 -0
- data/lib/ohai/plugins/dragonflybsd/network.rb +1 -0
- data/lib/ohai/plugins/dragonflybsd/platform.rb +1 -0
- data/lib/ohai/plugins/ec2.rb +1 -0
- data/lib/ohai/plugins/elixir.rb +1 -1
- data/lib/ohai/plugins/erlang.rb +1 -0
- data/lib/ohai/plugins/eucalyptus.rb +4 -1
- data/lib/ohai/plugins/filesystem.rb +1 -1
- data/lib/ohai/plugins/fips.rb +1 -0
- data/lib/ohai/plugins/freebsd/memory.rb +1 -0
- data/lib/ohai/plugins/freebsd/network.rb +1 -0
- data/lib/ohai/plugins/freebsd/platform.rb +1 -0
- data/lib/ohai/plugins/gce.rb +1 -0
- data/lib/ohai/plugins/go.rb +1 -1
- data/lib/ohai/plugins/groovy.rb +1 -1
- data/lib/ohai/plugins/haskell.rb +1 -0
- data/lib/ohai/plugins/hostname.rb +1 -0
- data/lib/ohai/plugins/init_package.rb +1 -0
- data/lib/ohai/plugins/java.rb +1 -0
- data/lib/ohai/plugins/joyent.rb +1 -0
- data/lib/ohai/plugins/kernel.rb +2 -1
- data/lib/ohai/plugins/keys.rb +1 -0
- data/lib/ohai/plugins/languages.rb +1 -0
- data/lib/ohai/plugins/libvirt.rb +1 -0
- data/lib/ohai/plugins/linode.rb +1 -0
- data/lib/ohai/plugins/linux/block_device.rb +1 -0
- data/lib/ohai/plugins/linux/hostnamectl.rb +3 -2
- data/lib/ohai/plugins/linux/interrupts.rb +1 -0
- data/lib/ohai/plugins/linux/ipc.rb +1 -0
- data/lib/ohai/plugins/linux/lsb.rb +6 -19
- data/lib/ohai/plugins/linux/lspci.rb +1 -0
- data/lib/ohai/plugins/linux/machineid.rb +1 -0
- data/lib/ohai/plugins/linux/mdadm.rb +1 -0
- data/lib/ohai/plugins/linux/memory.rb +37 -36
- data/lib/ohai/plugins/linux/network.rb +1 -0
- data/lib/ohai/plugins/linux/platform.rb +2 -1
- data/lib/ohai/plugins/linux/selinux.rb +1 -0
- data/lib/ohai/plugins/linux/sessions.rb +1 -0
- data/lib/ohai/plugins/linux/sysctl.rb +1 -0
- data/lib/ohai/plugins/linux/systemd_paths.rb +1 -0
- data/lib/ohai/plugins/linux/virtualization.rb +1 -0
- data/lib/ohai/plugins/lua.rb +1 -1
- data/lib/ohai/plugins/mono.rb +1 -1
- data/lib/ohai/plugins/netbsd/memory.rb +1 -0
- data/lib/ohai/plugins/netbsd/network.rb +1 -0
- data/lib/ohai/plugins/netbsd/platform.rb +1 -0
- data/lib/ohai/plugins/network.rb +1 -0
- data/lib/ohai/plugins/nodejs.rb +1 -1
- data/lib/ohai/plugins/ohai.rb +1 -0
- data/lib/ohai/plugins/ohai_time.rb +1 -0
- data/lib/ohai/plugins/openbsd/memory.rb +1 -0
- data/lib/ohai/plugins/openbsd/network.rb +1 -0
- data/lib/ohai/plugins/openbsd/platform.rb +1 -0
- data/lib/ohai/plugins/openstack.rb +1 -0
- data/lib/ohai/plugins/os.rb +1 -0
- data/lib/ohai/plugins/packages.rb +1 -0
- data/lib/ohai/plugins/passwd.rb +1 -0
- data/lib/ohai/plugins/perl.rb +1 -1
- data/lib/ohai/plugins/php.rb +1 -1
- data/lib/ohai/plugins/platform.rb +1 -0
- data/lib/ohai/plugins/powershell.rb +1 -1
- data/lib/ohai/plugins/ps.rb +1 -0
- data/lib/ohai/plugins/python.rb +1 -1
- data/lib/ohai/plugins/rackspace.rb +2 -1
- data/lib/ohai/plugins/root_group.rb +1 -0
- data/lib/ohai/plugins/ruby.rb +3 -2
- data/lib/ohai/plugins/rust.rb +1 -1
- data/lib/ohai/plugins/scala.rb +1 -0
- data/lib/ohai/plugins/scaleway.rb +1 -0
- data/lib/ohai/plugins/scsi.rb +1 -0
- data/lib/ohai/plugins/shard.rb +1 -1
- data/lib/ohai/plugins/shells.rb +1 -0
- data/lib/ohai/plugins/softlayer.rb +1 -0
- data/lib/ohai/plugins/solaris2/dmi.rb +1 -0
- data/lib/ohai/plugins/solaris2/memory.rb +1 -0
- data/lib/ohai/plugins/solaris2/network.rb +1 -0
- data/lib/ohai/plugins/solaris2/platform.rb +6 -12
- data/lib/ohai/plugins/solaris2/virtualization.rb +2 -1
- data/lib/ohai/plugins/ssh_host_key.rb +1 -0
- data/lib/ohai/plugins/sysconf.rb +1 -0
- data/lib/ohai/plugins/timezone.rb +1 -0
- data/lib/ohai/plugins/train.rb +1 -0
- data/lib/ohai/plugins/uptime.rb +1 -0
- data/lib/ohai/plugins/virtualbox.rb +1 -0
- data/lib/ohai/plugins/vmware.rb +1 -0
- data/lib/ohai/plugins/windows/dmi.rb +1 -0
- data/lib/ohai/plugins/windows/drivers.rb +1 -0
- data/lib/ohai/plugins/windows/memory.rb +1 -0
- data/lib/ohai/plugins/windows/network.rb +2 -1
- data/lib/ohai/plugins/windows/platform.rb +1 -0
- data/lib/ohai/plugins/windows/system_enclosure.rb +1 -0
- data/lib/ohai/plugins/windows/virtualization.rb +1 -0
- data/lib/ohai/plugins/zpools.rb +5 -2
- data/lib/ohai/provides_map.rb +1 -0
- data/lib/ohai/runner.rb +3 -4
- data/lib/ohai/system.rb +1 -0
- data/lib/ohai/train_transport.rb +1 -0
- data/lib/ohai/util/file_helper.rb +1 -0
- data/lib/ohai/util/ip_helper.rb +1 -0
- data/lib/ohai/util/win32.rb +1 -0
- data/lib/ohai/version.rb +2 -1
- data/ohai.gemspec +1 -0
- metadata +2 -2
data/lib/ohai/plugins/ec2.rb
CHANGED
data/lib/ohai/plugins/elixir.rb
CHANGED
data/lib/ohai/plugins/erlang.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Tim Dysinger (<tim@dysinger.net>)
|
3
4
|
# Author:: Benjamin Black (<bb@chef.io>)
|
@@ -28,6 +29,8 @@ Ohai.plugin(:Eucalyptus) do
|
|
28
29
|
provides "eucalyptus"
|
29
30
|
depends "network/interfaces"
|
30
31
|
|
32
|
+
MAC_MATCH = /^[dD]0:0[dD]:/.freeze
|
33
|
+
|
31
34
|
# returns the mac address from the collection of all address types
|
32
35
|
def get_mac_address(addresses)
|
33
36
|
detected_addresses = addresses.detect { |address, keypair| keypair == { "family" => "lladdr" } }
|
@@ -42,7 +45,7 @@ Ohai.plugin(:Eucalyptus) do
|
|
42
45
|
def has_euca_mac?
|
43
46
|
network[:interfaces].each_value do |iface|
|
44
47
|
mac = get_mac_address(iface[:addresses])
|
45
|
-
if
|
48
|
+
if MAC_MATCH.match?(mac)
|
46
49
|
logger.trace("Plugin Eucalyptus: has_euca_mac? == true (#{mac})")
|
47
50
|
return true
|
48
51
|
end
|
data/lib/ohai/plugins/fips.rb
CHANGED
data/lib/ohai/plugins/gce.rb
CHANGED
data/lib/ohai/plugins/go.rb
CHANGED
data/lib/ohai/plugins/groovy.rb
CHANGED
data/lib/ohai/plugins/haskell.rb
CHANGED
data/lib/ohai/plugins/java.rb
CHANGED
data/lib/ohai/plugins/joyent.rb
CHANGED
data/lib/ohai/plugins/kernel.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
4
|
# Author:: Benjamin Black (<nostromo@gmail.com>)
|
@@ -244,7 +245,7 @@ Ohai.plugin(:Kernel) do
|
|
244
245
|
# EXAMPLE:
|
245
246
|
# Id Loadaddr Size Info Rev Module Name
|
246
247
|
# 6 1180000 4623 1 1 specfs (filesystem for specfs)
|
247
|
-
module_description =
|
248
|
+
module_description = /\s*(\d+)\s+([a-f\d]+)\s+([a-f\d]+)\s+(?:[\-\d]+)\s+(?:\d+)\s+(\S+)\s+\((.+)\)$/
|
248
249
|
so.stdout.lines do |line|
|
249
250
|
if ( mod = module_description.match(line) )
|
250
251
|
modules[mod[4]] = { id: mod[1].to_i, loadaddr: mod[2], size: mod[3].to_i(16), description: mod[5] }
|
data/lib/ohai/plugins/keys.rb
CHANGED
data/lib/ohai/plugins/libvirt.rb
CHANGED
data/lib/ohai/plugins/linode.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Davide Cavalca (<dcavalca@fb.com>)
|
3
4
|
# Copyright:: Copyright (c) 2016 Facebook
|
@@ -25,8 +26,8 @@ Ohai.plugin(:Hostnamectl) do
|
|
25
26
|
hostnamectl_path = which("hostnamectl")
|
26
27
|
if hostnamectl_path
|
27
28
|
shell_out(hostnamectl_path).stdout.split("\n").each do |line|
|
28
|
-
key, val = line.split(":")
|
29
|
-
hostnamectl[key.chomp.lstrip.tr(" ", "_").downcase] = val
|
29
|
+
key, val = line.split(": ", 2)
|
30
|
+
hostnamectl[key.chomp.lstrip.tr(" ", "_").downcase] = val
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
4
|
# Copyright:: Copyright (c) Chef Software Inc.
|
@@ -26,34 +27,20 @@ Ohai.plugin(:LSB) do
|
|
26
27
|
# From package redhat-lsb on Fedora/Redhat, lsb-release on Debian/Ubuntu
|
27
28
|
shell_out("lsb_release -a").stdout.lines do |line|
|
28
29
|
case line
|
29
|
-
when /^Distributor ID:\s+(.+)
|
30
|
+
when /^Distributor ID:\s+(.+)/
|
30
31
|
lsb[:id] = $1
|
31
|
-
when /^Description:\s+(.+)
|
32
|
+
when /^Description:\s+(.+)/
|
32
33
|
lsb[:description] = $1
|
33
|
-
when /^Release:\s+(.+)
|
34
|
+
when /^Release:\s+(.+)/
|
34
35
|
lsb[:release] = $1
|
35
|
-
when /^Codename:\s+(.+)
|
36
|
+
when /^Codename:\s+(.+)/
|
36
37
|
lsb[:codename] = $1
|
37
38
|
else
|
38
39
|
lsb[:id] = line
|
39
40
|
end
|
40
41
|
end
|
41
|
-
elsif file_exist?("/etc/lsb-release")
|
42
|
-
# Old, non-standard Debian support
|
43
|
-
file_open("/etc/lsb-release").each do |line|
|
44
|
-
case line
|
45
|
-
when /^DISTRIB_ID=["']?(.+?)["']?$/
|
46
|
-
lsb[:id] = $1
|
47
|
-
when /^DISTRIB_RELEASE=["']?(.+?)["']?$/
|
48
|
-
lsb[:release] = $1
|
49
|
-
when /^DISTRIB_CODENAME=["']?(.+?)["']?$/
|
50
|
-
lsb[:codename] = $1
|
51
|
-
when /^DISTRIB_DESCRIPTION=["']?(.+?)["']?$/
|
52
|
-
lsb[:description] = $1
|
53
|
-
end
|
54
|
-
end
|
55
42
|
else
|
56
|
-
logger.trace("Plugin LSB: Skipping LSB, cannot find /
|
43
|
+
logger.trace("Plugin LSB: Skipping LSB, cannot find /usr/bin/lsb_release")
|
57
44
|
end
|
58
45
|
end
|
59
46
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
4
|
# Copyright:: Copyright (c) Chef Software Inc.
|
@@ -27,77 +28,77 @@ Ohai.plugin(:Memory) do
|
|
27
28
|
|
28
29
|
file_open("/proc/meminfo").each do |line|
|
29
30
|
case line
|
30
|
-
when /^MemTotal:\s+(\d+) (.+)
|
31
|
+
when /^MemTotal:\s+(\d+) (.+)/
|
31
32
|
memory[:total] = "#{$1}#{$2}"
|
32
|
-
when /^MemFree:\s+(\d+) (.+)
|
33
|
+
when /^MemFree:\s+(\d+) (.+)/
|
33
34
|
memory[:free] = "#{$1}#{$2}"
|
34
|
-
when /^MemAvailable:\s+(\d+) (.+)
|
35
|
+
when /^MemAvailable:\s+(\d+) (.+)/
|
35
36
|
memory[:available] = "#{$1}#{$2}"
|
36
|
-
when /^Buffers:\s+(\d+) (.+)
|
37
|
+
when /^Buffers:\s+(\d+) (.+)/
|
37
38
|
memory[:buffers] = "#{$1}#{$2}"
|
38
|
-
when /^Cached:\s+(\d+) (.+)
|
39
|
+
when /^Cached:\s+(\d+) (.+)/
|
39
40
|
memory[:cached] = "#{$1}#{$2}"
|
40
|
-
when /^Active:\s+(\d+) (.+)
|
41
|
+
when /^Active:\s+(\d+) (.+)/
|
41
42
|
memory[:active] = "#{$1}#{$2}"
|
42
|
-
when /^Inactive:\s+(\d+) (.+)
|
43
|
+
when /^Inactive:\s+(\d+) (.+)/
|
43
44
|
memory[:inactive] = "#{$1}#{$2}"
|
44
|
-
when /^HighTotal:\s+(\d+) (.+)
|
45
|
+
when /^HighTotal:\s+(\d+) (.+)/
|
45
46
|
memory[:high_total] = "#{$1}#{$2}"
|
46
|
-
when /^HighFree:\s+(\d+) (.+)
|
47
|
+
when /^HighFree:\s+(\d+) (.+)/
|
47
48
|
memory[:high_free] = "#{$1}#{$2}"
|
48
|
-
when /^LowTotal:\s+(\d+) (.+)
|
49
|
+
when /^LowTotal:\s+(\d+) (.+)/
|
49
50
|
memory[:low_total] = "#{$1}#{$2}"
|
50
|
-
when /^LowFree:\s+(\d+) (.+)
|
51
|
+
when /^LowFree:\s+(\d+) (.+)/
|
51
52
|
memory[:low_free] = "#{$1}#{$2}"
|
52
|
-
when /^Dirty:\s+(\d+) (.+)
|
53
|
+
when /^Dirty:\s+(\d+) (.+)/
|
53
54
|
memory[:dirty] = "#{$1}#{$2}"
|
54
|
-
when /^Writeback:\s+(\d+) (.+)
|
55
|
+
when /^Writeback:\s+(\d+) (.+)/
|
55
56
|
memory[:writeback] = "#{$1}#{$2}"
|
56
|
-
when /^AnonPages:\s+(\d+) (.+)
|
57
|
+
when /^AnonPages:\s+(\d+) (.+)/
|
57
58
|
memory[:anon_pages] = "#{$1}#{$2}"
|
58
|
-
when /^Mapped:\s+(\d+) (.+)
|
59
|
+
when /^Mapped:\s+(\d+) (.+)/
|
59
60
|
memory[:mapped] = "#{$1}#{$2}"
|
60
|
-
when /^Slab:\s+(\d+) (.+)
|
61
|
+
when /^Slab:\s+(\d+) (.+)/
|
61
62
|
memory[:slab] = "#{$1}#{$2}"
|
62
|
-
when /^SReclaimable:\s+(\d+) (.+)
|
63
|
+
when /^SReclaimable:\s+(\d+) (.+)/
|
63
64
|
memory[:slab_reclaimable] = "#{$1}#{$2}"
|
64
|
-
when /^SUnreclaim:\s+(\d+) (.+)
|
65
|
+
when /^SUnreclaim:\s+(\d+) (.+)/
|
65
66
|
memory[:slab_unreclaim] = "#{$1}#{$2}"
|
66
|
-
when /^PageTables:\s+(\d+) (.+)
|
67
|
+
when /^PageTables:\s+(\d+) (.+)/
|
67
68
|
memory[:page_tables] = "#{$1}#{$2}"
|
68
|
-
when /^NFS_Unstable:\s+(\d+) (.+)
|
69
|
+
when /^NFS_Unstable:\s+(\d+) (.+)/
|
69
70
|
memory[:nfs_unstable] = "#{$1}#{$2}"
|
70
|
-
when /^Bounce:\s+(\d+) (.+)
|
71
|
+
when /^Bounce:\s+(\d+) (.+)/
|
71
72
|
memory[:bounce] = "#{$1}#{$2}"
|
72
|
-
when /^CommitLimit:\s+(\d+) (.+)
|
73
|
+
when /^CommitLimit:\s+(\d+) (.+)/
|
73
74
|
memory[:commit_limit] = "#{$1}#{$2}"
|
74
|
-
when /^Committed_AS:\s+(\d+) (.+)
|
75
|
+
when /^Committed_AS:\s+(\d+) (.+)/
|
75
76
|
memory[:committed_as] = "#{$1}#{$2}"
|
76
|
-
when /^VmallocTotal:\s+(\d+) (.+)
|
77
|
+
when /^VmallocTotal:\s+(\d+) (.+)/
|
77
78
|
memory[:vmalloc_total] = "#{$1}#{$2}"
|
78
|
-
when /^VmallocUsed:\s+(\d+) (.+)
|
79
|
+
when /^VmallocUsed:\s+(\d+) (.+)/
|
79
80
|
memory[:vmalloc_used] = "#{$1}#{$2}"
|
80
|
-
when /^VmallocChunk:\s+(\d+) (.+)
|
81
|
+
when /^VmallocChunk:\s+(\d+) (.+)/
|
81
82
|
memory[:vmalloc_chunk] = "#{$1}#{$2}"
|
82
|
-
when /^SwapCached:\s+(\d+) (.+)
|
83
|
+
when /^SwapCached:\s+(\d+) (.+)/
|
83
84
|
memory[:swap][:cached] = "#{$1}#{$2}"
|
84
|
-
when /^SwapTotal:\s+(\d+) (.+)
|
85
|
+
when /^SwapTotal:\s+(\d+) (.+)/
|
85
86
|
memory[:swap][:total] = "#{$1}#{$2}"
|
86
|
-
when /^SwapFree:\s+(\d+) (.+)
|
87
|
+
when /^SwapFree:\s+(\d+) (.+)/
|
87
88
|
memory[:swap][:free] = "#{$1}#{$2}"
|
88
|
-
when /^HugePages_Total:\s+(\d+)
|
89
|
+
when /^HugePages_Total:\s+(\d+)/
|
89
90
|
memory[:hugepages][:total] = $1.to_s
|
90
|
-
when /^HugePages_Free:\s+(\d+)
|
91
|
+
when /^HugePages_Free:\s+(\d+)/
|
91
92
|
memory[:hugepages][:free] = $1.to_s
|
92
|
-
when /^HugePages_Rsvd:\s+(\d+)
|
93
|
+
when /^HugePages_Rsvd:\s+(\d+)/
|
93
94
|
memory[:hugepages][:reserved] = $1.to_s
|
94
|
-
when /^HugePages_Surp:\s+(\d+)
|
95
|
+
when /^HugePages_Surp:\s+(\d+)/
|
95
96
|
memory[:hugepages][:surplus] = $1.to_s
|
96
|
-
when /^Hugepagesize:\s+(\d+) (.+)
|
97
|
+
when /^Hugepagesize:\s+(\d+) (.+)/
|
97
98
|
memory[:hugepage_size] = "#{$1}#{$2}"
|
98
|
-
when /^Hugetlb:\s+(\d+) (.+)
|
99
|
+
when /^Hugetlb:\s+(\d+) (.+)/
|
99
100
|
memory[:hugetlb] = "#{$1}#{$2}"
|
100
|
-
when /^DirectMap([0-9]+[a-zA-Z]):\s+(\d+) (.+)
|
101
|
+
when /^DirectMap([0-9]+[a-zA-Z]):\s+(\d+) (.+)/
|
101
102
|
memory[:directmap][$1.to_sym] = "#{$2}#{$3}"
|
102
103
|
end
|
103
104
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
4
|
# Copyright:: Copyright (c) Chef Software Inc.
|
@@ -132,7 +133,7 @@ Ohai.plugin(:Platform) do
|
|
132
133
|
#
|
133
134
|
def platform_family_from_platform(plat)
|
134
135
|
case plat
|
135
|
-
when /debian/, /ubuntu/, /linuxmint/, /raspbian/, /cumulus/, /kali/
|
136
|
+
when /debian/, /ubuntu/, /linuxmint/, /raspbian/, /cumulus/, /kali/, /pop/
|
136
137
|
# apt-get+dpkg almost certainly goes here
|
137
138
|
"debian"
|
138
139
|
when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/, /xcp/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/, /clearos/, /bigip/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID"
|