ohai 16.12.3 → 16.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ohai/plugins/linux/os_release.rb +38 -0
- data/lib/ohai/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67ffbc76e1366d1413aa7f01ac2e8f4ff22b89f8a9fa8568b348a441c284b8f9
|
4
|
+
data.tar.gz: 59e0790fc0ee8182982c63f1d495c89a974fec9950a0843ac46d2eeb9dea6baf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 867b388ecf15e49431eaea7b315411522d8d57e2e4310cf867048dcadde9832dc94a02710c99ef332b8f51f4e9fe88db0bb00e47ac3505bc911a2ca3763a3a0e
|
7
|
+
data.tar.gz: 4c0d991e9d1b3b92f705611f54af8f826ecd866cbc7f8b65d4ad70fb879f4a1501a2e1a38a908e4e6b4c3d0367e4b16167d843ba5840d64f9b41a68aae448f33
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
#
|
3
|
+
# Author:: Lance Albertson (lance@osuosl.org>)
|
4
|
+
# Copyright:: Copyright (c) 2021 Oregon State University
|
5
|
+
# License:: Apache License, Version 2.0
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
Ohai.plugin(:OsRelease) do
|
21
|
+
provides "os_release"
|
22
|
+
|
23
|
+
collect_data(:linux) do
|
24
|
+
os_release Mash.new unless os_release
|
25
|
+
|
26
|
+
# https://www.freedesktop.org/software/systemd/man/os-release.html
|
27
|
+
if file_exist?("/etc/os-release")
|
28
|
+
file_read("/etc/os-release").each_line do |line|
|
29
|
+
key, value = line.split("=")
|
30
|
+
if key == "ID_LIKE"
|
31
|
+
os_release[key.downcase] = value.chomp.gsub(/\A"|"\Z/, "").split(" ") if value
|
32
|
+
else
|
33
|
+
os_release[key.downcase] = value.chomp.gsub(/\A"|"\Z/, "") if value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/ohai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.
|
4
|
+
version: 16.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -305,6 +305,7 @@ files:
|
|
305
305
|
- lib/ohai/plugins/linux/mdadm.rb
|
306
306
|
- lib/ohai/plugins/linux/memory.rb
|
307
307
|
- lib/ohai/plugins/linux/network.rb
|
308
|
+
- lib/ohai/plugins/linux/os_release.rb
|
308
309
|
- lib/ohai/plugins/linux/platform.rb
|
309
310
|
- lib/ohai/plugins/linux/selinux.rb
|
310
311
|
- lib/ohai/plugins/linux/sessions.rb
|