facter 4.0.14 → 4.0.15
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/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +3 -134
- data/CHANGELOG.md +24 -0
- data/CONTRIBUTING.md +93 -0
- data/Gemfile +4 -0
- data/Rakefile +60 -0
- data/VERSION +1 -1
- data/lib/custom_facts/util/collection.rb +1 -1
- data/lib/custom_facts/util/loader.rb +1 -1
- data/lib/custom_facts/util/parser.rb +1 -1
- data/lib/facter.rb +0 -1
- data/lib/facts/debian/lsbdistcodename.rb +16 -0
- data/lib/facts/debian/lsbdistdescription.rb +16 -0
- data/lib/facts/debian/lsbdistid.rb +16 -0
- data/lib/facts/debian/lsbdistrelease.rb +23 -0
- data/lib/facts/debian/os/distro/codename.rb +13 -4
- data/lib/facts/debian/os/distro/description.rb +2 -4
- data/lib/facts/debian/os/distro/id.rb +2 -4
- data/lib/facts/debian/os/distro/release.rb +1 -5
- data/lib/facts/el/processor.rb +1 -0
- data/lib/facts/el/sshalgorithmkey.rb +1 -0
- data/lib/facts/el/sshfp_algorithm.rb +1 -0
- data/lib/facts/macosx/sshalgorithmkey.rb +1 -0
- data/lib/facts/macosx/sshfp_algorithm.rb +1 -0
- data/lib/facts/sles/processor.rb +1 -0
- data/lib/facts/sles/sshalgorithmkey.rb +1 -0
- data/lib/facts/sles/sshfp_algorithm.rb +1 -0
- data/lib/facts/windows/ipaddress6_interfaces.rb +1 -0
- data/lib/facts/windows/ipaddress_interfaces.rb +1 -0
- data/lib/facts/windows/macaddress_interfaces.rb +1 -0
- data/lib/facts/windows/mtu_interfaces.rb +1 -0
- data/lib/facts/windows/netmask6_interfaces.rb +1 -0
- data/lib/facts/windows/netmask_interfaces.rb +1 -0
- data/lib/facts/windows/network6_interfaces.rb +1 -0
- data/lib/facts/windows/network_interfaces.rb +1 -0
- data/lib/facts/windows/processor.rb +1 -0
- data/lib/facts/windows/scope6_interfaces.rb +1 -0
- data/lib/framework/cli/cli.rb +7 -7
- data/lib/framework/core/fact/internal/internal_fact_manager.rb +4 -1
- data/lib/framework/core/fact_loaders/internal_fact_loader.rb +1 -1
- data/lib/models/resolved_fact.rb +4 -0
- data/lib/resolvers/windows/networking_resolver.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ac142ce04ba0e86b5a01726649b5b779562b472e162fb446261a15d9873efe4
|
|
4
|
+
data.tar.gz: ed8f02efebff60c27c93be0b6073564c80b38f850b4c564a29e12994b1057636
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 19ca811ddbfeb3fd48f1376bb8a5694242ecb70ff83e85aff34c38eeeb55a43cf5ccf810494b6bbaebe26b6564e0a66dca5f8b9d578550447c757074b7a36bef
|
|
7
|
+
data.tar.gz: db4abe8360068573b590dfcf648da8e99decf2f392870b1fd29daa6e32695547bd1bc141c5d82c6fdd28bc3f8025c2f2256891a72d7b0920f87d9aff36bd2f28
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config --exclude-limit 1000`
|
|
3
|
-
# on 2020-
|
|
3
|
+
# on 2020-04-07 19:23:35 +0300 using RuboCop version 0.74.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 69
|
|
10
|
-
# Configuration parameters: Prefixes.
|
|
11
|
-
# Prefixes: when, with, without
|
|
12
|
-
RSpec/ContextWording:
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'spec/custom_facts/core/execution/posix_spec.rb'
|
|
15
|
-
- 'spec/custom_facts/core/execution/windows_spec.rb'
|
|
16
|
-
- 'spec/custom_facts/shared_contexts/platform.rb'
|
|
17
|
-
- 'spec/custom_facts/util/parser_spec.rb'
|
|
18
|
-
- 'spec/facter/fact_filter_spec.rb'
|
|
19
|
-
- 'spec/facter/facter_spec.rb'
|
|
20
|
-
- 'spec/facter/facts/macosx/is_virtual_spec.rb'
|
|
21
|
-
- 'spec/facter/resolvers/solaris/current_zone_resolver_spec.rb'
|
|
22
|
-
- 'spec/facter/resolvers/solaris/solaris_release_resolver_spec.rb'
|
|
23
|
-
- 'spec/facter/resolvers/solaris/zfs_resolver_spec.rb'
|
|
24
|
-
- 'spec/facter/resolvers/solaris/zone_resolver_spec.rb'
|
|
25
|
-
- 'spec/facter/resolvers/solaris/zpool_resolver_spec.rb'
|
|
26
|
-
- 'spec/facter/resolvers/ssh_resolver_spec.rb'
|
|
27
|
-
- 'spec/facter/resolvers/utils/windows/network_utils_spec.rb'
|
|
28
|
-
- 'spec/framework/config/config_reader_spec.rb'
|
|
29
|
-
- 'spec/framework/core/fact_loaders/external_fact_loader_spec.rb'
|
|
30
|
-
- 'spec/framework/core/options_spec.rb'
|
|
31
|
-
- 'spec/framework/formatters/legacy_fact_formatter_spec.rb'
|
|
32
|
-
|
|
33
9
|
# Offense count: 79
|
|
34
10
|
# Configuration parameters: CustomTransform, IgnoreMethods.
|
|
35
11
|
RSpec/FilePath:
|
|
@@ -122,12 +98,6 @@ RSpec/InstanceVariable:
|
|
|
122
98
|
- 'spec/custom_facts/util/collection_spec.rb'
|
|
123
99
|
- 'spec/custom_facts/util/confine_spec.rb'
|
|
124
100
|
|
|
125
|
-
# Offense count: 2
|
|
126
|
-
RSpec/IteratedExpectation:
|
|
127
|
-
Exclude:
|
|
128
|
-
- 'spec/custom_facts/core/aggregate_spec.rb'
|
|
129
|
-
- 'spec/custom_facts/core/suitable_spec.rb'
|
|
130
|
-
|
|
131
101
|
# Offense count: 16
|
|
132
102
|
RSpec/LeakyConstantDeclaration:
|
|
133
103
|
Exclude:
|
|
@@ -138,14 +108,13 @@ RSpec/LeakyConstantDeclaration:
|
|
|
138
108
|
- 'spec/facter/resolvers/macosx/mountpoints_resolver_spec.rb'
|
|
139
109
|
- 'spec/facter/resolvers/utils/windows/network_utils_spec.rb'
|
|
140
110
|
|
|
141
|
-
# Offense count:
|
|
111
|
+
# Offense count: 121
|
|
142
112
|
# Configuration parameters: EnforcedStyle.
|
|
143
113
|
# SupportedStyles: have_received, receive
|
|
144
114
|
RSpec/MessageSpies:
|
|
145
115
|
Exclude:
|
|
146
116
|
- 'spec/custom_facts/core/aggregate_spec.rb'
|
|
147
117
|
- 'spec/custom_facts/core/execution/fact_manager_spec.rb'
|
|
148
|
-
- 'spec/custom_facts/core/execution/posix_spec.rb'
|
|
149
118
|
- 'spec/custom_facts/core/execution/windows_spec.rb'
|
|
150
119
|
- 'spec/custom_facts/core/execution_spec.rb'
|
|
151
120
|
- 'spec/custom_facts/core/logging_spec.rb'
|
|
@@ -159,59 +128,20 @@ RSpec/MessageSpies:
|
|
|
159
128
|
- 'spec/custom_facts/util/parser_spec.rb'
|
|
160
129
|
- 'spec/custom_facts/util/resolution_spec.rb'
|
|
161
130
|
- 'spec/facter/facter_spec.rb'
|
|
162
|
-
- 'spec/facter/facts/aix/networking/domain_spec.rb'
|
|
163
|
-
- 'spec/facter/facts/aix/networking/fqdn_spec.rb'
|
|
164
|
-
- 'spec/facter/facts/aix/networking/hostname_spec.rb'
|
|
165
|
-
- 'spec/facter/facts/aix/networking/ip_spec.rb'
|
|
166
|
-
- 'spec/facter/facts/aix/networking/primary_spec.rb'
|
|
167
131
|
- 'spec/facter/facts/aix/os/name_spec.rb'
|
|
168
132
|
- 'spec/facter/facts/aix/os/release_spec.rb'
|
|
169
|
-
- 'spec/facter/facts/aix/ruby/version_spec.rb'
|
|
170
|
-
- 'spec/facter/facts/debian/networking/domain_spec.rb'
|
|
171
|
-
- 'spec/facter/facts/debian/networking/fqdn_spec.rb'
|
|
172
|
-
- 'spec/facter/facts/debian/networking/hostname_spec.rb'
|
|
173
|
-
- 'spec/facter/facts/debian/networking/interfaces_spec.rb'
|
|
174
|
-
- 'spec/facter/facts/debian/networking/ip_spec.rb'
|
|
175
|
-
- 'spec/facter/facts/debian/networking/primary_spec.rb'
|
|
176
|
-
- 'spec/facter/facts/debian/os/family_spec.rb'
|
|
177
|
-
- 'spec/facter/facts/debian/ruby/version_spec.rb'
|
|
178
|
-
- 'spec/facter/facts/el/networking/domain_spec.rb'
|
|
179
|
-
- 'spec/facter/facts/el/networking/fqdn_spec.rb'
|
|
180
|
-
- 'spec/facter/facts/el/networking/hostname_spec.rb'
|
|
181
|
-
- 'spec/facter/facts/el/networking/interfaces_spec.rb'
|
|
182
|
-
- 'spec/facter/facts/el/networking/ip_spec.rb'
|
|
183
|
-
- 'spec/facter/facts/el/networking/primary_spec.rb'
|
|
184
133
|
- 'spec/facter/facts/macosx/is_virtual_spec.rb'
|
|
185
|
-
- 'spec/facter/facts/macosx/memory/swap/used_spec.rb'
|
|
186
|
-
- 'spec/facter/facts/macosx/memory/system/used_spec.rb'
|
|
187
134
|
- 'spec/facter/facts/macosx/mountpoints_spec.rb'
|
|
188
|
-
- 'spec/facter/facts/macosx/networking/domain_spec.rb'
|
|
189
|
-
- 'spec/facter/facts/macosx/networking/fqdn_spec.rb'
|
|
190
|
-
- 'spec/facter/facts/macosx/networking/hostname_spec.rb'
|
|
191
135
|
- 'spec/facter/facts/macosx/os/architecture_spec.rb'
|
|
192
136
|
- 'spec/facter/facts/macosx/os/family_spec.rb'
|
|
193
137
|
- 'spec/facter/facts/macosx/os/name_spec.rb'
|
|
194
|
-
- 'spec/facter/facts/macosx/ruby/version_spec.rb'
|
|
195
|
-
- 'spec/facter/facts/sles/facterversion_spec.rb'
|
|
196
|
-
- 'spec/facter/facts/sles/networking/domain_spec.rb'
|
|
197
|
-
- 'spec/facter/facts/sles/networking/fqdn_spec.rb'
|
|
198
|
-
- 'spec/facter/facts/sles/networking/hostname_spec.rb'
|
|
199
|
-
- 'spec/facter/facts/sles/networking/interfaces_spec.rb'
|
|
200
|
-
- 'spec/facter/facts/sles/networking/ip_spec.rb'
|
|
201
|
-
- 'spec/facter/facts/sles/networking/primary_spec.rb'
|
|
202
138
|
- 'spec/facter/facts/sles/os/architecture_spec.rb'
|
|
203
139
|
- 'spec/facter/facts/sles/os/name_spec.rb'
|
|
204
140
|
- 'spec/facter/facts/sles/os/release_spec.rb'
|
|
205
|
-
- 'spec/facter/facts/solaris/facterversion_spec.rb'
|
|
206
|
-
- 'spec/facter/facts/solaris/networking/domain_spec.rb'
|
|
207
|
-
- 'spec/facter/facts/solaris/networking/fqdn_spec.rb'
|
|
208
|
-
- 'spec/facter/facts/solaris/networking/hostname_spec.rb'
|
|
209
141
|
- 'spec/facter/facts/solaris/os/architecture_spec.rb'
|
|
210
142
|
- 'spec/facter/facts/solaris/os/name_spec.rb'
|
|
211
|
-
- 'spec/facter/facts/solaris/os/release_spec.rb'
|
|
212
143
|
- 'spec/facter/facts/solaris/ruby/platform_spec.rb'
|
|
213
144
|
- 'spec/facter/facts/solaris/ruby/sitedir_spec.rb'
|
|
214
|
-
- 'spec/facter/facts/solaris/ruby/version_spec.rb'
|
|
215
145
|
- 'spec/facter/facts/windows/dmi/manufacturer_spec.rb'
|
|
216
146
|
- 'spec/facter/facts/windows/dmi/product/name_spec.rb'
|
|
217
147
|
- 'spec/facter/facts/windows/dmi/product/serial_number_spec.rb'
|
|
@@ -230,21 +160,10 @@ RSpec/MessageSpies:
|
|
|
230
160
|
- 'spec/facter/facts/windows/netmask_interfaces_spec.rb'
|
|
231
161
|
- 'spec/facter/facts/windows/network6_interfaces_spec.rb'
|
|
232
162
|
- 'spec/facter/facts/windows/network_interfaces_spec.rb'
|
|
233
|
-
- 'spec/facter/facts/windows/networking/domain_spec.rb'
|
|
234
|
-
- 'spec/facter/facts/windows/networking/fqdn_spec.rb'
|
|
235
|
-
- 'spec/facter/facts/windows/networking/hostname_spec.rb'
|
|
236
|
-
- 'spec/facter/facts/windows/networking/ip6_spec.rb'
|
|
237
|
-
- 'spec/facter/facts/windows/networking/mac_spec.rb'
|
|
238
|
-
- 'spec/facter/facts/windows/networking/netmask6_spec.rb'
|
|
239
|
-
- 'spec/facter/facts/windows/networking/netmask_spec.rb'
|
|
240
|
-
- 'spec/facter/facts/windows/networking/network6_spec.rb'
|
|
241
|
-
- 'spec/facter/facts/windows/networking/network_spec.rb'
|
|
242
|
-
- 'spec/facter/facts/windows/networking/scope6_spec.rb'
|
|
243
163
|
- 'spec/facter/facts/windows/os/architecture_spec.rb'
|
|
244
164
|
- 'spec/facter/facts/windows/os/family_spec.rb'
|
|
245
165
|
- 'spec/facter/facts/windows/os/hardware_spec.rb'
|
|
246
166
|
- 'spec/facter/facts/windows/os/name_spec.rb'
|
|
247
|
-
- 'spec/facter/facts/windows/os/release_spec.rb'
|
|
248
167
|
- 'spec/facter/facts/windows/os/windows/edition_id_spec.rb'
|
|
249
168
|
- 'spec/facter/facts/windows/os/windows/installation_type_spec.rb'
|
|
250
169
|
- 'spec/facter/facts/windows/os/windows/product_name_spec.rb'
|
|
@@ -255,19 +174,10 @@ RSpec/MessageSpies:
|
|
|
255
174
|
- 'spec/facter/facts/windows/processors/physicalcount_spec.rb'
|
|
256
175
|
- 'spec/facter/facts/windows/ruby/platform_spec.rb'
|
|
257
176
|
- 'spec/facter/facts/windows/ruby/sitedir_spec.rb'
|
|
258
|
-
- 'spec/facter/facts/windows/ruby/version_spec.rb'
|
|
259
177
|
- 'spec/facter/facts/windows/scope6_interfaces_spec.rb'
|
|
260
|
-
- 'spec/facter/resolvers/aix/ffi_helper_spec.rb'
|
|
261
178
|
- 'spec/facter/resolvers/utils/aix/odm_query_spec.rb'
|
|
262
|
-
- 'spec/framework/config/block_list_spec.rb'
|
|
263
179
|
- 'spec/framework/config/config_reader_spec.rb'
|
|
264
180
|
- 'spec/framework/core/fact_loaders/external_fact_loader_spec.rb'
|
|
265
|
-
- 'spec/framework/detector/os_detector_spec.rb'
|
|
266
|
-
|
|
267
|
-
# Offense count: 118
|
|
268
|
-
# Configuration parameters: AggregateFailuresByDefault.
|
|
269
|
-
RSpec/MultipleExpectations:
|
|
270
|
-
Max: 9
|
|
271
181
|
|
|
272
182
|
# Offense count: 26
|
|
273
183
|
RSpec/SubjectStub:
|
|
@@ -280,7 +190,7 @@ RSpec/SubjectStub:
|
|
|
280
190
|
- 'spec/custom_facts/util/fact_spec.rb'
|
|
281
191
|
- 'spec/custom_facts/util/resolution_spec.rb'
|
|
282
192
|
|
|
283
|
-
# Offense count:
|
|
193
|
+
# Offense count: 193
|
|
284
194
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
|
285
195
|
RSpec/VerifiedDoubles:
|
|
286
196
|
Exclude:
|
|
@@ -291,49 +201,12 @@ RSpec/VerifiedDoubles:
|
|
|
291
201
|
- 'spec/custom_facts/util/fact_spec.rb'
|
|
292
202
|
- 'spec/custom_facts/util/resolution_spec.rb'
|
|
293
203
|
- 'spec/facter/facter_spec.rb'
|
|
294
|
-
- 'spec/facter/facts/aix/facterversion_spec.rb'
|
|
295
|
-
- 'spec/facter/facts/aix/kernel_spec.rb'
|
|
296
|
-
- 'spec/facter/facts/aix/kernelmajversion_spec.rb'
|
|
297
|
-
- 'spec/facter/facts/aix/kernelrelease_spec.rb'
|
|
298
|
-
- 'spec/facter/facts/aix/kernelversion_spec.rb'
|
|
299
|
-
- 'spec/facter/facts/aix/path_spec.rb'
|
|
300
204
|
- 'spec/facter/facts/aix/ssh_spec.rb'
|
|
301
|
-
- 'spec/facter/facts/debian/facterversion_spec.rb'
|
|
302
|
-
- 'spec/facter/facts/debian/kernel_spec.rb'
|
|
303
|
-
- 'spec/facter/facts/debian/kernelmajversion_spec.rb'
|
|
304
|
-
- 'spec/facter/facts/debian/kernelrelease_spec.rb'
|
|
305
|
-
- 'spec/facter/facts/debian/kernelversion_spec.rb'
|
|
306
|
-
- 'spec/facter/facts/debian/path_spec.rb'
|
|
307
|
-
- 'spec/facter/facts/el/facterversion_spec.rb'
|
|
308
|
-
- 'spec/facter/facts/el/kernel_spec.rb'
|
|
309
|
-
- 'spec/facter/facts/el/kernelmajversion_spec.rb'
|
|
310
|
-
- 'spec/facter/facts/el/kernelrelease_spec.rb'
|
|
311
|
-
- 'spec/facter/facts/el/kernelversion_spec.rb'
|
|
312
|
-
- 'spec/facter/facts/el/path_spec.rb'
|
|
313
|
-
- 'spec/facter/facts/macosx/facterversion_spec.rb'
|
|
314
|
-
- 'spec/facter/facts/macosx/kernel_spec.rb'
|
|
315
|
-
- 'spec/facter/facts/macosx/kernelmajversion_spec.rb'
|
|
316
|
-
- 'spec/facter/facts/macosx/kernelrelease_spec.rb'
|
|
317
|
-
- 'spec/facter/facts/macosx/kernelversion_spec.rb'
|
|
318
205
|
- 'spec/facter/facts/macosx/memory/swap/capacity_spec.rb'
|
|
319
206
|
- 'spec/facter/facts/macosx/memory/swap/used_bytes_spec.rb'
|
|
320
|
-
- 'spec/facter/facts/macosx/memory/swap/used_spec.rb'
|
|
321
207
|
- 'spec/facter/facts/macosx/memory/system/capacity_spec.rb'
|
|
322
208
|
- 'spec/facter/facts/macosx/memory/system/used_bytes_spec.rb'
|
|
323
|
-
- 'spec/facter/facts/macosx/memory/system/used_spec.rb'
|
|
324
|
-
- 'spec/facter/facts/macosx/path_spec.rb'
|
|
325
|
-
- 'spec/facter/facts/sles/kernel_spec.rb'
|
|
326
|
-
- 'spec/facter/facts/sles/kernelmajversion_spec.rb'
|
|
327
|
-
- 'spec/facter/facts/sles/kernelrelease_spec.rb'
|
|
328
|
-
- 'spec/facter/facts/sles/kernelversion_spec.rb'
|
|
329
|
-
- 'spec/facter/facts/sles/path_spec.rb'
|
|
330
|
-
- 'spec/facter/facts/solaris/kernel_spec.rb'
|
|
331
|
-
- 'spec/facter/facts/solaris/kernelmajversion_spec.rb'
|
|
332
|
-
- 'spec/facter/facts/solaris/kernelrelease_spec.rb'
|
|
333
|
-
- 'spec/facter/facts/solaris/kernelversion_spec.rb'
|
|
334
|
-
- 'spec/facter/facts/solaris/path_spec.rb'
|
|
335
209
|
- 'spec/facter/facts/windows/dmi/product/serial_number_spec.rb'
|
|
336
|
-
- 'spec/facter/facts/windows/facterversion_spec.rb'
|
|
337
210
|
- 'spec/facter/facts/windows/hypervisors/hyperv_spec.rb'
|
|
338
211
|
- 'spec/facter/facts/windows/hypervisors/kvm_spec.rb'
|
|
339
212
|
- 'spec/facter/facts/windows/hypervisors/virtualbox_spec.rb'
|
|
@@ -342,12 +215,10 @@ RSpec/VerifiedDoubles:
|
|
|
342
215
|
- 'spec/facter/facts/windows/identity/privileged_spec.rb'
|
|
343
216
|
- 'spec/facter/facts/windows/memory/system/capacity_spec.rb'
|
|
344
217
|
- 'spec/facter/facts/windows/memory/system/used_bytes_spec.rb'
|
|
345
|
-
- 'spec/facter/facts/windows/memory/system/used_spec.rb'
|
|
346
218
|
- 'spec/facter/facts/windows/networking/dhcp_spec.rb'
|
|
347
219
|
- 'spec/facter/facts/windows/networking/interfaces_spec.rb'
|
|
348
220
|
- 'spec/facter/facts/windows/networking/mtu_spec.rb'
|
|
349
221
|
- 'spec/facter/facts/windows/networking/primary_spec.rb'
|
|
350
|
-
- 'spec/facter/facts/windows/path_spec.rb'
|
|
351
222
|
- 'spec/facter/facts/windows/processors/models_spec.rb'
|
|
352
223
|
- 'spec/facter/facts/windows/virtualization/is_virtual_spec.rb'
|
|
353
224
|
- 'spec/facter/facts/windows/virtualization/virtual_spec.rb'
|
|
@@ -378,8 +249,6 @@ RSpec/VerifiedDoubles:
|
|
|
378
249
|
- 'spec/facter/resolvers/windows/virtualization_resolver_spec.rb'
|
|
379
250
|
- 'spec/facter/resolvers/windows/win_os_description_resolver_spec.rb'
|
|
380
251
|
- 'spec/framework/config/block_list_spec.rb'
|
|
381
|
-
- 'spec/framework/core/fact/external/external_fact_manager_spec.rb'
|
|
382
|
-
- 'spec/framework/core/fact/internal/internal_fact_manager_spec.rb'
|
|
383
252
|
- 'spec/framework/core/fact_loaders/external_fact_loader_spec.rb'
|
|
384
253
|
- 'spec/framework/core/fact_loaders/fact_loader_spec.rb'
|
|
385
254
|
- 'spec/framework/core/fact_manager_spec.rb'
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
## [4.0.14](https://github.com/puppetlabs/facter-ng/tree/4.0.14) (2020-04-01)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/puppetlabs/facter-ng/compare/4.0.13...4.0.14)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- \(FACT-2512\) Handle Raspbian as Debian [\#421](https://github.com/puppetlabs/facter-ng/pull/421) ([mlove-au](https://github.com/mlove-au))
|
|
10
|
+
- \(FACT-2231\) Add AIX mountpoints fact [\#398](https://github.com/puppetlabs/facter-ng/pull/398) ([oanatmaria](https://github.com/oanatmaria))
|
|
11
|
+
- \(FACT-2471\) Add Linux partitions fact [\#393](https://github.com/puppetlabs/facter-ng/pull/393) ([oanatmaria](https://github.com/oanatmaria))
|
|
12
|
+
- Debugger tool [\#391](https://github.com/puppetlabs/facter-ng/pull/391) ([sebastian-miclea](https://github.com/sebastian-miclea))
|
|
13
|
+
- \(FACT-2435\) Expose :expand as an option to execute command [\#342](https://github.com/puppetlabs/facter-ng/pull/342) ([florindragos](https://github.com/florindragos))
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- \(FACT-2511\) Remove file logger [\#425](https://github.com/puppetlabs/facter-ng/pull/425) ([IrimieBogdan](https://github.com/IrimieBogdan))
|
|
18
|
+
- \(FACT-2498\) Internal fact loader should only load facts once [\#420](https://github.com/puppetlabs/facter-ng/pull/420) ([IrimieBogdan](https://github.com/IrimieBogdan))
|
|
19
|
+
- Avoid exceptions for zone facts on FreeBSD [\#412](https://github.com/puppetlabs/facter-ng/pull/412) ([smortex](https://github.com/smortex))
|
|
20
|
+
- \(FACT-2475\) Fix os.release on Debian [\#410](https://github.com/puppetlabs/facter-ng/pull/410) ([oanatmaria](https://github.com/oanatmaria))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
|
|
2
|
+
# How to contribute
|
|
3
|
+
|
|
4
|
+
Third-party patches are essential for keeping facter great. We simply can't
|
|
5
|
+
access the huge number of platforms and myriad configurations for running
|
|
6
|
+
Facter. We want to keep it as easy as possible to contribute changes that
|
|
7
|
+
get things working in your environment. There are a few guidelines that we
|
|
8
|
+
need contributors to follow so that we can have a chance of keeping on
|
|
9
|
+
top of things.
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
* Make sure you have a [Jira account](https://tickets.puppetlabs.com).
|
|
14
|
+
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
|
15
|
+
* Submit a Jira ticket for your issue if one does not already exist.
|
|
16
|
+
* Clearly describe the issue including steps to reproduce when it is a bug.
|
|
17
|
+
* Make sure you fill in the earliest version that you know has the issue.
|
|
18
|
+
* A ticket is not necessary for [trivial changes](https://puppet.com/community/trivial-patch-exemption-policy)
|
|
19
|
+
* Fork the repository on GitHub.
|
|
20
|
+
|
|
21
|
+
## Making Changes
|
|
22
|
+
|
|
23
|
+
* Create a topic branch from where you want to base your work.
|
|
24
|
+
* This is usually the master branch.
|
|
25
|
+
* Once merged, your work will be automatically promoted to the other release
|
|
26
|
+
streams when our internal CI passes.
|
|
27
|
+
* To quickly create a topic branch based on master, run `git checkout -b
|
|
28
|
+
fix/master/my_contribution master`. Please avoid working directly on the
|
|
29
|
+
`master` branch.
|
|
30
|
+
* Make commits of logical units.
|
|
31
|
+
* Check for unnecessary whitespace with `git diff --check` before committing.
|
|
32
|
+
* Make sure your commit messages are in the proper format. We use the [50/72 rule](https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project) in commit messages.
|
|
33
|
+
* If the commit addresses an issue filed in the [Facter Jira project](https://tickets.puppetlabs.com/browse/FACT), start the first line of the commit with the issue number in parentheses.
|
|
34
|
+
|
|
35
|
+
````
|
|
36
|
+
(FACT-1234) Make the example in CONTRIBUTING imperative and concrete
|
|
37
|
+
|
|
38
|
+
Without this patch applied the example commit message in the CONTRIBUTING
|
|
39
|
+
document is not a concrete example. This is a problem because the
|
|
40
|
+
contributor is left to imagine what the commit message should look like
|
|
41
|
+
based on a description rather than an example. This patch fixes the
|
|
42
|
+
problem by making the example concrete and imperative.
|
|
43
|
+
|
|
44
|
+
The first line is a real life imperative statement with a ticket number
|
|
45
|
+
from our issue tracker. The body describes the behavior without the patch,
|
|
46
|
+
why this is a problem, and how the patch fixes the problem when applied.
|
|
47
|
+
````
|
|
48
|
+
|
|
49
|
+
* Make sure you have added the necessary tests for your changes.
|
|
50
|
+
* Run _all_ the tests to assure nothing else was accidentally broken.
|
|
51
|
+
* We recommend running `./check.sh` to have the same checks run as on github
|
|
52
|
+
|
|
53
|
+
## Making Trivial Changes
|
|
54
|
+
|
|
55
|
+
For [changes of a trivial nature](https://puppet.com/community/trivial-patch-exemption-policy), it is not always necessary to create a new
|
|
56
|
+
ticket in Jira. In this case, it is appropriate to start the first line of a
|
|
57
|
+
commit with one of `(docs)` or `(maint)` instead of a ticket number.
|
|
58
|
+
|
|
59
|
+
If a Jira ticket exists for the documentation commit, you can include it
|
|
60
|
+
after the `(docs)` token.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
(docs)(DOCUMENT-000) Add docs commit example to CONTRIBUTING
|
|
64
|
+
|
|
65
|
+
There is no example for contributing a documentation commit
|
|
66
|
+
to the Facter repository. This is a problem because the contributor
|
|
67
|
+
is left to assume how a commit of this nature may appear.
|
|
68
|
+
|
|
69
|
+
The first line is a real-life imperative statement with '(docs)' in
|
|
70
|
+
place of what would have been the FACT project ticket number in a
|
|
71
|
+
non-documentation related commit. The body describes the nature of
|
|
72
|
+
the new documentation or comments added.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For commits that address trivial repository maintenance tasks start the first line of the commit with `(maint)`
|
|
76
|
+
|
|
77
|
+
## Submitting Changes
|
|
78
|
+
|
|
79
|
+
* Sign the [Contributor License Agreement](http://links.puppet.com/cla).
|
|
80
|
+
* Push your changes to a topic branch in your fork of the repository.
|
|
81
|
+
* Submit a pull request to the repository in the puppetlabs organization.
|
|
82
|
+
* Update your ticket to mark that you have submitted code and are ready for it to be reviewed.
|
|
83
|
+
* Include a link to the pull request in the ticket
|
|
84
|
+
|
|
85
|
+
# Additional Resources
|
|
86
|
+
|
|
87
|
+
* [Puppet community guidelines](https://puppet.com/community/community-guidelines/)
|
|
88
|
+
* [Bug tracker (Jira)](https://tickets.puppetlabs.com/browse/FACT)
|
|
89
|
+
* [Contributor License Agreement](http://links.puppet.com/cla)
|
|
90
|
+
* [General GitHub documentation](http://help.github.com/)
|
|
91
|
+
* [GitHub pull request documentation](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
|
|
92
|
+
* [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev)
|
|
93
|
+
* [Puppet-dev Slack channel](https://puppetcommunity.slack.com/archives/C0W1X7ZAL)
|
data/Gemfile
CHANGED
|
@@ -4,5 +4,9 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
|
4
4
|
|
|
5
5
|
gemspec name: 'facter'
|
|
6
6
|
|
|
7
|
+
group(:release, optional: true) do
|
|
8
|
+
gem 'github_changelog_generator' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')
|
|
9
|
+
end
|
|
10
|
+
|
|
7
11
|
local_gemfile = File.expand_path('Gemfile.local', __dir__)
|
|
8
12
|
eval_gemfile(local_gemfile) if File.exist?(local_gemfile)
|
data/Rakefile
CHANGED
|
@@ -7,3 +7,63 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
7
7
|
Dir.glob(File.join('tasks/**/*.rake')).each { |file| load file }
|
|
8
8
|
|
|
9
9
|
task default: :spec
|
|
10
|
+
|
|
11
|
+
def retrieve_from_keyboard
|
|
12
|
+
puts "Please provide the next release tag:\n"
|
|
13
|
+
next_version = $stdin.gets.chomp
|
|
14
|
+
raise(ArgumentError, ' The string that you entered is invalid!') unless /[0-9]+\.[0-9]+\.[0-9]+/.match?(next_version)
|
|
15
|
+
|
|
16
|
+
next_version
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
if Bundler.rubygems.find_name('github_changelog_generator').any?
|
|
20
|
+
require 'github_changelog_generator/task'
|
|
21
|
+
|
|
22
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
23
|
+
if Rake.application.top_level_tasks.include?('changelog') &&
|
|
24
|
+
ENV['CHANGELOG_GITHUB_TOKEN'].nil?
|
|
25
|
+
raise 'Set CHANGELOG_GITHUB_TOKEN environment variable' /
|
|
26
|
+
" eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'"
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
config.user = 'puppetlabs'
|
|
30
|
+
config.project = 'facter-ng'
|
|
31
|
+
config.since_tag = File.read('VERSION').strip
|
|
32
|
+
config.future_release = retrieve_from_keyboard
|
|
33
|
+
config.exclude_labels = ['maintenance']
|
|
34
|
+
config.add_pr_wo_labels = true
|
|
35
|
+
config.issues = false
|
|
36
|
+
config.max_issues = 100
|
|
37
|
+
config.header = ''
|
|
38
|
+
config.base = 'CHANGELOG.md'
|
|
39
|
+
config.merge_prefix = '### UNCATEGORIZED PRS; GO LABEL THEM'
|
|
40
|
+
config.configure_sections = {
|
|
41
|
+
"Changed": {
|
|
42
|
+
"prefix": '### Changed',
|
|
43
|
+
"labels": ['backwards-incompatible']
|
|
44
|
+
},
|
|
45
|
+
"Added": {
|
|
46
|
+
"prefix": '### Added',
|
|
47
|
+
"labels": ['feature']
|
|
48
|
+
},
|
|
49
|
+
"Fixed": {
|
|
50
|
+
"prefix": '### Fixed',
|
|
51
|
+
"labels": ['bugfix']
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
else
|
|
56
|
+
desc 'Generate a Changelog from GitHub'
|
|
57
|
+
task :changelog do
|
|
58
|
+
raise <<~ERRORMESSAGE
|
|
59
|
+
The changelog tasks depends on github_changelog_generator gem.
|
|
60
|
+
Please install github_changelog_generator:
|
|
61
|
+
---
|
|
62
|
+
Gemfile:
|
|
63
|
+
optional:
|
|
64
|
+
':release':
|
|
65
|
+
- gem: 'github_changelog_generator'
|
|
66
|
+
condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
|
|
67
|
+
ERRORMESSAGE
|
|
68
|
+
end
|
|
69
|
+
end
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.15
|
|
@@ -32,7 +32,7 @@ module LegacyFacter
|
|
|
32
32
|
|
|
33
33
|
fact
|
|
34
34
|
rescue StandardError => e
|
|
35
|
-
|
|
35
|
+
Facter.log_exception(e, "Unable to add fact #{name}: #{e}")
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
# Add a resolution mechanism for a named fact. This does not distinguish
|
|
@@ -112,7 +112,7 @@ module LegacyFacter
|
|
|
112
112
|
# Don't store the path if the file can't be loaded
|
|
113
113
|
# in case it's loadable later on.
|
|
114
114
|
@loaded.delete(file)
|
|
115
|
-
|
|
115
|
+
Facter.log_exception(e, "Error loading fact #{file}: #{e.message}")
|
|
116
116
|
end
|
|
117
117
|
end
|
|
118
118
|
|
|
@@ -58,7 +58,7 @@ module LegacyFacter
|
|
|
58
58
|
def results
|
|
59
59
|
parse_results
|
|
60
60
|
rescue Exception => e
|
|
61
|
-
|
|
61
|
+
Facter.log_exception(e, "Failed to handle #{filename} as #{self.class} facts: #{e.message}")
|
|
62
62
|
nil
|
|
63
63
|
end
|
|
64
64
|
|
data/lib/facter.rb
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Facts
|
|
4
|
+
module Debian
|
|
5
|
+
class Lsbdistcodename
|
|
6
|
+
FACT_NAME = 'lsbdistcodename'
|
|
7
|
+
TYPE = :legacy
|
|
8
|
+
|
|
9
|
+
def call_the_resolver
|
|
10
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:codename)
|
|
11
|
+
|
|
12
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value, :legacy)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Facts
|
|
4
|
+
module Debian
|
|
5
|
+
class Lsbdistdescription
|
|
6
|
+
FACT_NAME = 'lsbdistdescription'
|
|
7
|
+
TYPE = :legacy
|
|
8
|
+
|
|
9
|
+
def call_the_resolver
|
|
10
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:description)
|
|
11
|
+
|
|
12
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value, :legacy)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Facts
|
|
4
|
+
module Debian
|
|
5
|
+
class Lsbdistid
|
|
6
|
+
FACT_NAME = 'lsbdistid'
|
|
7
|
+
TYPE = :legacy
|
|
8
|
+
|
|
9
|
+
def call_the_resolver
|
|
10
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:distributor_id)
|
|
11
|
+
|
|
12
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value, :legacy)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Facts
|
|
4
|
+
module Debian
|
|
5
|
+
class Lsbdistrelease
|
|
6
|
+
FACT_NAME = 'lsbdistrelease'
|
|
7
|
+
ALIASES = %w[lsbmajdistrelease lsbminordistrelease].freeze
|
|
8
|
+
TYPE = :legacy
|
|
9
|
+
|
|
10
|
+
def call_the_resolver
|
|
11
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:release)
|
|
12
|
+
|
|
13
|
+
return Facter::ResolvedFact.new(FACT_NAME, nil, :legacy) unless fact_value
|
|
14
|
+
|
|
15
|
+
version = fact_value.split('.')
|
|
16
|
+
|
|
17
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value, :legacy),
|
|
18
|
+
Facter::ResolvedFact.new(ALIASES[0], version[0], :legacy),
|
|
19
|
+
Facter::ResolvedFact.new(ALIASES[1], version[1], :legacy)]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -6,13 +6,22 @@ module Facts
|
|
|
6
6
|
module Distro
|
|
7
7
|
class Codename
|
|
8
8
|
FACT_NAME = 'os.distro.codename'
|
|
9
|
-
ALIASES = 'lsbdistcodename'
|
|
10
9
|
|
|
11
10
|
def call_the_resolver
|
|
12
|
-
fact_value = Facter::Resolvers::
|
|
11
|
+
fact_value = Facter::Resolvers::OsRelease.resolve(:version_codename)
|
|
12
|
+
fact_value ||= retreieve_from_version
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def retreieve_from_version
|
|
18
|
+
version = Facter::Resolvers::OsRelease.resolve(:version)
|
|
19
|
+
return unless version
|
|
20
|
+
|
|
21
|
+
codename = /\(.*\)$/.match(version).to_s.gsub(/\(|\)/, '')
|
|
22
|
+
return codename unless codename.empty?
|
|
23
|
+
|
|
24
|
+
/[A-Za-z]+\s[A-Za-z]+/.match(version).to_s.split(' ').first.downcase
|
|
16
25
|
end
|
|
17
26
|
end
|
|
18
27
|
end
|
|
@@ -6,13 +6,11 @@ module Facts
|
|
|
6
6
|
module Distro
|
|
7
7
|
class Description
|
|
8
8
|
FACT_NAME = 'os.distro.description'
|
|
9
|
-
ALIASES = 'lsbdistdescription'
|
|
10
9
|
|
|
11
10
|
def call_the_resolver
|
|
12
|
-
fact_value = Facter::Resolvers::
|
|
11
|
+
fact_value = Facter::Resolvers::OsRelease.resolve(:pretty_name)
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
|
13
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
|
16
14
|
end
|
|
17
15
|
end
|
|
18
16
|
end
|
|
@@ -6,13 +6,11 @@ module Facts
|
|
|
6
6
|
module Distro
|
|
7
7
|
class Id
|
|
8
8
|
FACT_NAME = 'os.distro.id'
|
|
9
|
-
ALIASES = 'lsbdistid'
|
|
10
9
|
|
|
11
10
|
def call_the_resolver
|
|
12
|
-
fact_value = Facter::Resolvers::
|
|
11
|
+
fact_value = Facter::Resolvers::OsRelease.resolve(:id).capitalize
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
|
13
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
|
16
14
|
end
|
|
17
15
|
end
|
|
18
16
|
end
|
|
@@ -6,7 +6,6 @@ module Facts
|
|
|
6
6
|
module Distro
|
|
7
7
|
class Release
|
|
8
8
|
FACT_NAME = 'os.distro.release'
|
|
9
|
-
ALIASES = %w[lsbdistrelease lsbmajdistrelease lsbminordistrelease].freeze
|
|
10
9
|
|
|
11
10
|
def call_the_resolver
|
|
12
11
|
fact_value = determine_release_for_os
|
|
@@ -16,10 +15,7 @@ module Facts
|
|
|
16
15
|
versions = fact_value.split('.')
|
|
17
16
|
release = { 'full' => fact_value, 'major' => versions[0], 'minor' => versions[1].gsub(/^0([1-9])/, '\1') }
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
Facter::ResolvedFact.new(ALIASES[0], fact_value, :legacy),
|
|
21
|
-
Facter::ResolvedFact.new(ALIASES[1], release['major'], :legacy),
|
|
22
|
-
Facter::ResolvedFact.new(ALIASES[2], release['minor'], :legacy)]
|
|
18
|
+
Facter::ResolvedFact.new(FACT_NAME, release)
|
|
23
19
|
end
|
|
24
20
|
|
|
25
21
|
private
|
data/lib/facts/el/processor.rb
CHANGED
data/lib/facts/sles/processor.rb
CHANGED
data/lib/framework/cli/cli.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Facter
|
|
|
10
10
|
desc: 'Enable color output.'
|
|
11
11
|
|
|
12
12
|
class_option :config,
|
|
13
|
-
aliases:
|
|
13
|
+
aliases: '-c',
|
|
14
14
|
type: :string,
|
|
15
15
|
desc: 'The location of the config file.'
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ module Facter
|
|
|
20
20
|
desc: 'A directory to use for custom facts.'
|
|
21
21
|
|
|
22
22
|
class_option :debug,
|
|
23
|
-
aliases:
|
|
23
|
+
aliases: '-d',
|
|
24
24
|
type: :boolean,
|
|
25
25
|
desc: 'Enable debug output.'
|
|
26
26
|
|
|
@@ -31,7 +31,7 @@ module Facter
|
|
|
31
31
|
|
|
32
32
|
class_option :help,
|
|
33
33
|
hide: true,
|
|
34
|
-
aliases:
|
|
34
|
+
aliases: '-h',
|
|
35
35
|
type: :boolean,
|
|
36
36
|
desc: 'Print this help message.'
|
|
37
37
|
|
|
@@ -40,7 +40,7 @@ module Facter
|
|
|
40
40
|
desc: 'Output in Hocon format.'
|
|
41
41
|
|
|
42
42
|
class_option :json,
|
|
43
|
-
aliases:
|
|
43
|
+
aliases: '-j',
|
|
44
44
|
type: :boolean,
|
|
45
45
|
desc: 'Output in JSON format.'
|
|
46
46
|
|
|
@@ -53,7 +53,7 @@ module Facter
|
|
|
53
53
|
desc: 'List the names of all cacheable fact groups.'
|
|
54
54
|
|
|
55
55
|
class_option :log_level,
|
|
56
|
-
aliases:
|
|
56
|
+
aliases: '-l',
|
|
57
57
|
type: :string,
|
|
58
58
|
desc: 'Set logging level. Supported levels are: none, trace, debug, info, warn, error, and fatal.'
|
|
59
59
|
|
|
@@ -90,7 +90,7 @@ module Facter
|
|
|
90
90
|
desc: 'Show legacy facts when querying all facts.'
|
|
91
91
|
|
|
92
92
|
class_option :yaml,
|
|
93
|
-
aliases:
|
|
93
|
+
aliases: '-y',
|
|
94
94
|
type: :boolean,
|
|
95
95
|
desc: 'Output in YAML format.'
|
|
96
96
|
|
|
@@ -100,7 +100,7 @@ module Facter
|
|
|
100
100
|
|
|
101
101
|
class_option :puppet,
|
|
102
102
|
type: :boolean,
|
|
103
|
-
aliases:
|
|
103
|
+
aliases: '-p',
|
|
104
104
|
desc: 'Load the Puppet libraries, thus allowing Facter to load Puppet-specific facts.'
|
|
105
105
|
|
|
106
106
|
desc 'query', 'Default method', hide: true
|
|
@@ -19,7 +19,10 @@ module Facter
|
|
|
19
19
|
def start_threads(searched_facts)
|
|
20
20
|
threads = []
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
# only resolve a fact once, even if multiple search facts depend on that fact
|
|
23
|
+
searched_facts
|
|
24
|
+
.uniq { |searched_fact| searched_fact.fact_class.name }
|
|
25
|
+
.each do |searched_fact|
|
|
23
26
|
threads << Thread.new do
|
|
24
27
|
fact = CoreFact.new(searched_fact)
|
|
25
28
|
fact.create
|
|
@@ -37,7 +37,7 @@ module Facter
|
|
|
37
37
|
# if fact is already loaded, skip it
|
|
38
38
|
next if @facts.any? { |fact| fact.name == fact_name }
|
|
39
39
|
|
|
40
|
-
type =
|
|
40
|
+
type = class_name.const_defined?('TYPE') ? class_name::TYPE : :core
|
|
41
41
|
load_fact(fact_name, class_name, type)
|
|
42
42
|
next unless class_name.const_defined?('ALIASES')
|
|
43
43
|
|
data/lib/models/resolved_fact.rb
CHANGED
|
@@ -40,7 +40,7 @@ module Facter
|
|
|
40
40
|
if error == NetworkingFFI::ERROR_BUFFER_OVERFLOW
|
|
41
41
|
adapter_addresses = FFI::MemoryPointer.new(IpAdapterAddressesLh.size, NetworkingFFI::BUFFER_LENGTH)
|
|
42
42
|
else
|
|
43
|
-
@log.
|
|
43
|
+
@log.debug 'Unable to retrieve networking facts!'
|
|
44
44
|
return nil
|
|
45
45
|
end
|
|
46
46
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: facter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-04-
|
|
11
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -200,7 +200,9 @@ files:
|
|
|
200
200
|
- ".rubocop_todo.yml"
|
|
201
201
|
- ".rubycritic.yml"
|
|
202
202
|
- ".travis.yml"
|
|
203
|
+
- CHANGELOG.md
|
|
203
204
|
- CODEOWNERS
|
|
205
|
+
- CONTRIBUTING.md
|
|
204
206
|
- Gemfile
|
|
205
207
|
- LICENSE
|
|
206
208
|
- README.md
|
|
@@ -311,6 +313,10 @@ files:
|
|
|
311
313
|
- lib/facts/debian/kernelrelease.rb
|
|
312
314
|
- lib/facts/debian/kernelversion.rb
|
|
313
315
|
- lib/facts/debian/load_averages.rb
|
|
316
|
+
- lib/facts/debian/lsbdistcodename.rb
|
|
317
|
+
- lib/facts/debian/lsbdistdescription.rb
|
|
318
|
+
- lib/facts/debian/lsbdistid.rb
|
|
319
|
+
- lib/facts/debian/lsbdistrelease.rb
|
|
314
320
|
- lib/facts/debian/memory/swap/available.rb
|
|
315
321
|
- lib/facts/debian/memory/swap/available_bytes.rb
|
|
316
322
|
- lib/facts/debian/memory/swap/capacity.rb
|