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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3157ed0544a09a2be70af496e0b3f36fa538a82b1186555f8380c42ba38bcc6
4
- data.tar.gz: 433621ca5500cff124015f57d6ba2e4a7479579b44f18918961eb04bec8300c2
3
+ metadata.gz: 67ffbc76e1366d1413aa7f01ac2e8f4ff22b89f8a9fa8568b348a441c284b8f9
4
+ data.tar.gz: 59e0790fc0ee8182982c63f1d495c89a974fec9950a0843ac46d2eeb9dea6baf
5
5
  SHA512:
6
- metadata.gz: d2eba25677fc4cbdeb090f7c05d86ddd240f02513d24b07204e5a6ffa79560125e8bf444f1ce8622bbac337076db4b3c6cf9e90ef58318ca49debfe829d35c73
7
- data.tar.gz: 6e304286a016ae9d23467ab158f4bcf512e993e0e466124909d57fdc509a1c553ab8241b24f5a63f7347e954c1b5b3fa03d040003ede9586c45fdaaecb042067
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
@@ -19,5 +19,5 @@
19
19
 
20
20
  module Ohai
21
21
  OHAI_ROOT = File.expand_path(__dir__)
22
- VERSION = "16.12.3"
22
+ VERSION = "16.13.0"
23
23
  end
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.12.3
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-02 00:00:00.000000000 Z
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