openfact 5.1.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: 40177b8ef9effc0ff98d84fd8c91453d510425e54de661ec5942d0531cfd66ef
4
- data.tar.gz: 4f4c3e366c7af40c7e46fc4461f6d25409c75345f10045e485ef82f878a7c442
3
+ metadata.gz: b6cec519d31ed1d4b77bae7a0fbac303f4605f365e7afc620c0cb1643342a0e7
4
+ data.tar.gz: 027216c6caf2eff1cd6d4e2ddfa2711773a90de299c74b8d116a7f088cd770e1
5
5
  SHA512:
6
- metadata.gz: bc4a8098539e6eddab337133e2c60e19976b24dfe1f9049c1fc2c8e5ae0f6141c054ee268c1dc9d2ddfa7bbb7b73f3ed36d9fe5ce259e8f686dd2bce1e645011
7
- data.tar.gz: 03344a4c89baaaa9a415375593279c8ea9b55362274f8dd8a17f6b355749d481d01d425334728b53c983331150b559bf4c03a0fecbb2d865f50d0d1bf502f8bf
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
- facter - collect and display facts about the current system
3
- ===========================================================
4
-
5
- SYNOPSIS
6
- --------
7
- <b>facter</b> [options] [query] [query] [...]
8
-
9
- DESCRIPTION
10
- -----------
11
- <b>facter</b> is a command-line tool that gathers basic facts about nodes (systems) such as hardware details, network settings, OS type and version, and more. These facts are made available as variables in your Puppet manifests and can be used to inform conditional expressions in Puppet.
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
- OPTIONS
18
- -------
19
- <% Facter::Cli.class_options.each do |name, option| -%><% next if option.hide%>
20
- * `<%= option.aliases[0] + '`, `' if option.aliases.any? %>--<%= 'no-' if negate_options.include?(name.to_s)%><%= name.to_s.gsub('_','-') %>`:
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
- <em>/etc/puppetlabs/facter/facter.conf</em>
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Facter
4
- VERSION = '5.1.0' unless defined?(VERSION)
4
+ VERSION = '5.2.0' unless defined?(VERSION)
5
5
  end
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.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenVox Project
@@ -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.7
1240
+ rubygems_version: 3.6.9
1240
1241
  specification_version: 4
1241
1242
  summary: OpenFact, a system inventory tool
1242
1243
  test_files: []