openfact 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6cec519d31ed1d4b77bae7a0fbac303f4605f365e7afc620c0cb1643342a0e7
|
|
4
|
+
data.tar.gz: 027216c6caf2eff1cd6d4e2ddfa2711773a90de299c74b8d116a7f088cd770e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d55d51133f6cd0a59f7346c09dd068baf6e454ecb175b6bbfadf6ead1ce94ad2533fbedfef1dbea9109e1f16af52fd09159785c65e2ba9e178caf0dba71ccf51
|
|
7
|
+
data.tar.gz: eb3766cd8804b91d639d46ca576d18bae169a197bcc10ffc00f028c8a835e9fa6c512126af756ad4acf92da3b525abbbc93909613896fc2dd02d2c1503886575
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Facts
|
|
4
|
+
module Linux
|
|
5
|
+
module Os
|
|
6
|
+
class Support
|
|
7
|
+
FACT_NAME = 'os.support'
|
|
8
|
+
|
|
9
|
+
def call_the_resolver
|
|
10
|
+
# https://www.freedesktop.org/software/systemd/man/latest/os-release.html#SUPPORT_END=
|
|
11
|
+
support_end = Facter::Resolvers::OsRelease.resolve(:support_end)
|
|
12
|
+
|
|
13
|
+
return unless support_end
|
|
14
|
+
|
|
15
|
+
[Facter::ResolvedFact.new(FACT_NAME, end: support_end)]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -476,6 +476,7 @@ os_hierarchy.each do |os|
|
|
|
476
476
|
require_relative '../../facts/linux/os/selinux/enabled'
|
|
477
477
|
require_relative '../../facts/linux/os/selinux/enforced'
|
|
478
478
|
require_relative '../../facts/linux/os/selinux/policy_version'
|
|
479
|
+
require_relative '../../facts/linux/os/support'
|
|
479
480
|
require_relative '../../facts/linux/partitions'
|
|
480
481
|
require_relative '../../facts/linux/path'
|
|
481
482
|
require_relative '../../facts/linux/processor'
|
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
<%# encoding: UTF-8
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<%# encoding: UTF-8 -%>
|
|
2
|
+
.Dd <%= Time.now.strftime("%b %d, %Y") %>
|
|
3
|
+
.Dt FACTER 1
|
|
4
|
+
.Os
|
|
5
|
+
.Sh NAME
|
|
6
|
+
.Nm facter
|
|
7
|
+
.Nd collect and display facts about the current system
|
|
8
|
+
.Sh SYNOPSIS
|
|
9
|
+
.Nm
|
|
10
|
+
.Op Ar options
|
|
11
|
+
.Op Ar query ...
|
|
12
|
+
<% Facter::Cli.commands.select { |_k, command_class| command_class.instance_of?(Thor::Command) }.each do |name, command| -%>
|
|
13
|
+
.Nm
|
|
14
|
+
.Fl Fl <%= name.to_s.gsub('_','-') %>
|
|
15
|
+
<% end -%>
|
|
16
|
+
.Sh DESCRIPTION
|
|
17
|
+
.Nm
|
|
18
|
+
is a command-line tool that gathers basic facts about nodes (systems) such as hardware details, network settings, OS type and version, and more.
|
|
19
|
+
These facts are made available as variables in your Puppet manifests and can be used to inform conditional expressions in Puppet.
|
|
20
|
+
.Pp
|
|
13
21
|
If no queries are given, then all facts will be returned.
|
|
14
|
-
|
|
22
|
+
.Pp
|
|
15
23
|
Many of the command line options can also be set via the HOCON config file. This file can also be used to block or cache certain fact groups.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<%
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<%= option.description %>
|
|
23
|
-
|
|
24
|
-
<% end -%>
|
|
25
|
-
|
|
26
|
-
<% Facter::Cli.commands.select { |_k, command_class| command_class.instance_of?(Thor::Command) }.each do |_, command| -%>
|
|
27
|
-
* `<%= command.usage %>`:
|
|
28
|
-
|
|
29
|
-
<%= command.description %>
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
.Sh OPTIONS
|
|
25
|
+
.Bl -tag
|
|
26
|
+
<% Facter::Cli.class_options.each do |name, option| -%><% next if option.hide-%>
|
|
27
|
+
.It <% if option.aliases.any? %>Fl <%= option.aliases[0].sub(/^-/, '') %> , <% end %>Fl Fl <%= 'no-' if negate_options.include?(name.to_s)%><%= name.to_s.gsub('_','-') %><% if option.type == :string %>= Ns Ar value<% end %>
|
|
28
|
+
<%= option.description %>
|
|
32
29
|
<% end -%>
|
|
33
|
-
|
|
34
|
-
FILES
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
.El
|
|
31
|
+
.Sh FILES
|
|
32
|
+
.Bl -tag
|
|
33
|
+
.It /etc/puppetlabs/facter/facter.conf
|
|
38
34
|
A HOCON config file that can be used to specify directories for custom and external facts, set various command line options, and specify facts to block. See example below for details, or visit the [GitHub README](https://github.com/puppetlabs/puppetlabs-hocon#overview).
|
|
39
|
-
|
|
40
|
-
EXAMPLES
|
|
41
|
-
--------
|
|
35
|
+
.Sh EXAMPLES
|
|
42
36
|
Display all facts:
|
|
43
|
-
|
|
44
|
-
```
|
|
37
|
+
.Bd -literal -offset indent
|
|
45
38
|
$ facter
|
|
46
39
|
disks => {
|
|
47
40
|
sda => {
|
|
@@ -59,11 +52,10 @@ dmi => {
|
|
|
59
52
|
}
|
|
60
53
|
}
|
|
61
54
|
[...]
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
.Ed
|
|
56
|
+
.Pp
|
|
64
57
|
Display a single structured fact:
|
|
65
|
-
|
|
66
|
-
```
|
|
58
|
+
.Bd -literal -offset indent
|
|
67
59
|
$ facter processors
|
|
68
60
|
{
|
|
69
61
|
count => 2,
|
|
@@ -74,37 +66,33 @@ $ facter processors
|
|
|
74
66
|
],
|
|
75
67
|
physicalcount => 2
|
|
76
68
|
}
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
.Ed
|
|
70
|
+
.Pp
|
|
79
71
|
Display a single fact nested within a structured fact:
|
|
80
|
-
|
|
81
|
-
```
|
|
72
|
+
.Bd -literal -offset indent
|
|
82
73
|
$ facter processors.isa
|
|
83
74
|
x86_64
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
.Ed
|
|
76
|
+
.Pp
|
|
86
77
|
Display a single legacy fact. Note that non-structured facts existing in previous versions of Facter are still available,
|
|
87
78
|
but are not displayed by default due to redundancy with newer structured facts:
|
|
88
|
-
|
|
89
|
-
```
|
|
79
|
+
.Bd -literal -offset indent
|
|
90
80
|
$ facter processorcount
|
|
91
81
|
2
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
.Ed
|
|
83
|
+
.Pp
|
|
94
84
|
Format facts as JSON:
|
|
95
|
-
|
|
96
|
-
```
|
|
85
|
+
.Bd -literal -offset indent
|
|
97
86
|
$ facter --json os.name os.release.major processors.isa
|
|
98
87
|
{
|
|
99
88
|
"os.name": "Ubuntu",
|
|
100
89
|
"os.release.major": "14.04",
|
|
101
90
|
"processors.isa": "x86_64"
|
|
102
91
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
An example config file
|
|
106
|
-
|
|
107
|
-
```
|
|
92
|
+
.Ed
|
|
93
|
+
.Pp
|
|
94
|
+
An example config file:
|
|
95
|
+
.Bd -literal -offset indent
|
|
108
96
|
# always loaded (CLI and as Ruby module)
|
|
109
97
|
global : {
|
|
110
98
|
external-dir : "~/external/facts",
|
|
@@ -130,4 +118,4 @@ facts : {
|
|
|
130
118
|
# for valid time-to-live entries, use --list-cache-groups
|
|
131
119
|
ttls : [ { "timezone" : 30 days } ]
|
|
132
120
|
}
|
|
133
|
-
|
|
121
|
+
.Ed
|
data/lib/facter/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openfact
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenVox Project
|
|
@@ -88,6 +88,9 @@ dependencies:
|
|
|
88
88
|
- - "~>"
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
90
|
version: '1.28'
|
|
91
|
+
- - "<"
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: '1.79'
|
|
91
94
|
type: :development
|
|
92
95
|
prerelease: false
|
|
93
96
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -95,6 +98,9 @@ dependencies:
|
|
|
95
98
|
- - "~>"
|
|
96
99
|
- !ruby/object:Gem::Version
|
|
97
100
|
version: '1.28'
|
|
101
|
+
- - "<"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '1.79'
|
|
98
104
|
- !ruby/object:Gem::Dependency
|
|
99
105
|
name: rubocop-performance
|
|
100
106
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -179,6 +185,26 @@ dependencies:
|
|
|
179
185
|
- - "~>"
|
|
180
186
|
- !ruby/object:Gem::Version
|
|
181
187
|
version: '0.9'
|
|
188
|
+
- !ruby/object:Gem::Dependency
|
|
189
|
+
name: base64
|
|
190
|
+
requirement: !ruby/object:Gem::Requirement
|
|
191
|
+
requirements:
|
|
192
|
+
- - ">="
|
|
193
|
+
- !ruby/object:Gem::Version
|
|
194
|
+
version: '0.1'
|
|
195
|
+
- - "<"
|
|
196
|
+
- !ruby/object:Gem::Version
|
|
197
|
+
version: '0.4'
|
|
198
|
+
type: :runtime
|
|
199
|
+
prerelease: false
|
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
201
|
+
requirements:
|
|
202
|
+
- - ">="
|
|
203
|
+
- !ruby/object:Gem::Version
|
|
204
|
+
version: '0.1'
|
|
205
|
+
- - "<"
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: '0.4'
|
|
182
208
|
- !ruby/object:Gem::Dependency
|
|
183
209
|
name: hocon
|
|
184
210
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -193,6 +219,20 @@ dependencies:
|
|
|
193
219
|
- - "~>"
|
|
194
220
|
- !ruby/object:Gem::Version
|
|
195
221
|
version: '1.3'
|
|
222
|
+
- !ruby/object:Gem::Dependency
|
|
223
|
+
name: logger
|
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
|
225
|
+
requirements:
|
|
226
|
+
- - "~>"
|
|
227
|
+
- !ruby/object:Gem::Version
|
|
228
|
+
version: '1.7'
|
|
229
|
+
type: :runtime
|
|
230
|
+
prerelease: false
|
|
231
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
232
|
+
requirements:
|
|
233
|
+
- - "~>"
|
|
234
|
+
- !ruby/object:Gem::Version
|
|
235
|
+
version: '1.7'
|
|
196
236
|
- !ruby/object:Gem::Dependency
|
|
197
237
|
name: thor
|
|
198
238
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -202,7 +242,7 @@ dependencies:
|
|
|
202
242
|
version: 1.0.1
|
|
203
243
|
- - "<"
|
|
204
244
|
- !ruby/object:Gem::Version
|
|
205
|
-
version: '
|
|
245
|
+
version: '2'
|
|
206
246
|
type: :runtime
|
|
207
247
|
prerelease: false
|
|
208
248
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -212,7 +252,7 @@ dependencies:
|
|
|
212
252
|
version: 1.0.1
|
|
213
253
|
- - "<"
|
|
214
254
|
- !ruby/object:Gem::Version
|
|
215
|
-
version: '
|
|
255
|
+
version: '2'
|
|
216
256
|
description: You can prove anything with facts!
|
|
217
257
|
email:
|
|
218
258
|
- openvox@voxpupuli.org
|
|
@@ -552,6 +592,7 @@ files:
|
|
|
552
592
|
- lib/facter/facts/linux/os/selinux/enabled.rb
|
|
553
593
|
- lib/facter/facts/linux/os/selinux/enforced.rb
|
|
554
594
|
- lib/facter/facts/linux/os/selinux/policy_version.rb
|
|
595
|
+
- lib/facter/facts/linux/os/support.rb
|
|
555
596
|
- lib/facter/facts/linux/partitions.rb
|
|
556
597
|
- lib/facter/facts/linux/path.rb
|
|
557
598
|
- lib/facter/facts/linux/processor.rb
|
|
@@ -1196,7 +1237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1196
1237
|
- !ruby/object:Gem::Version
|
|
1197
1238
|
version: '0'
|
|
1198
1239
|
requirements: []
|
|
1199
|
-
rubygems_version: 3.6.
|
|
1240
|
+
rubygems_version: 3.6.9
|
|
1200
1241
|
specification_version: 4
|
|
1201
1242
|
summary: OpenFact, a system inventory tool
|
|
1202
1243
|
test_files: []
|