openfact 5.1.0 → 5.2.1
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 +4 -4
- data/lib/facter/facts/linux/os/support.rb +20 -0
- data/lib/facter/framework/core/file_loader.rb +1 -0
- data/lib/facter/templates/man.erb +49 -61
- data/lib/facter/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5a589e601bbd6104761454fe62993ccd31ecff21e819fa9264956ac5aa22130
|
|
4
|
+
data.tar.gz: 5513ddbfd7586fb4d471aa97f423ad347ad3f0c79a7f3f1ad064a7482c8e73b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 110648d95577eb8336f1b75051d03b676ae34bb39ae23956265170a925f390e0844d769b369159aa3dd2b770d2702867262530697fdd7be1c9f3fd8e98e3f4a0
|
|
7
|
+
data.tar.gz: 3b078e9f6be75c1b19de6192c02a3643775347b8ef099cd96e7fcc398cceedfa0bdbb5510300791c81bee7c460558e47114cf8b789958f8d7f94c4e0fcff26e9
|
|
@@ -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.1
|
|
4
|
+
version: 5.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenVox Project
|
|
@@ -225,14 +225,14 @@ dependencies:
|
|
|
225
225
|
requirements:
|
|
226
226
|
- - "~>"
|
|
227
227
|
- !ruby/object:Gem::Version
|
|
228
|
-
version: '1.
|
|
228
|
+
version: '1.5'
|
|
229
229
|
type: :runtime
|
|
230
230
|
prerelease: false
|
|
231
231
|
version_requirements: !ruby/object:Gem::Requirement
|
|
232
232
|
requirements:
|
|
233
233
|
- - "~>"
|
|
234
234
|
- !ruby/object:Gem::Version
|
|
235
|
-
version: '1.
|
|
235
|
+
version: '1.5'
|
|
236
236
|
- !ruby/object:Gem::Dependency
|
|
237
237
|
name: thor
|
|
238
238
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -592,6 +592,7 @@ files:
|
|
|
592
592
|
- lib/facter/facts/linux/os/selinux/enabled.rb
|
|
593
593
|
- lib/facter/facts/linux/os/selinux/enforced.rb
|
|
594
594
|
- lib/facter/facts/linux/os/selinux/policy_version.rb
|
|
595
|
+
- lib/facter/facts/linux/os/support.rb
|
|
595
596
|
- lib/facter/facts/linux/partitions.rb
|
|
596
597
|
- lib/facter/facts/linux/path.rb
|
|
597
598
|
- lib/facter/facts/linux/processor.rb
|
|
@@ -1236,7 +1237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1236
1237
|
- !ruby/object:Gem::Version
|
|
1237
1238
|
version: '0'
|
|
1238
1239
|
requirements: []
|
|
1239
|
-
rubygems_version: 3.6.
|
|
1240
|
+
rubygems_version: 3.6.9
|
|
1240
1241
|
specification_version: 4
|
|
1241
1242
|
summary: OpenFact, a system inventory tool
|
|
1242
1243
|
test_files: []
|