facter 4.0.10.pre → 4.0.11

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: e7baf6d5b1b24f41a21f9ef4854a86a894ad3fb46d47b3eeac21a1d1fe785493
4
- data.tar.gz: 3d925266d7ad956951a7157de64c3cee79a42098821cfc63c5b868397a5c0e2e
3
+ metadata.gz: 4dc756f457596cb1e7c5dc236119090baa3bdc669e4cd35e9820144cf8d1b585
4
+ data.tar.gz: 78f30898f661ecd030dd0857f4f68e38ac55f1c8efe551f24e8a4f5c97ab8c77
5
5
  SHA512:
6
- metadata.gz: b785aebebb84571e18b779e1bed3c7ea6f79fda7fe01476595b1c12a6c79a817243c65cdfe44eaac11ef58f591f99ab94c5200a4646b5bd893c51dd3d6c187dc
7
- data.tar.gz: a813e1da2e65bdbbe816b5bccd25cb90f2c2c0bca737329b964a4eecb6743a6f385c9399ce11f755a8686e2b8ce5279df7fb9a1aa8e79b45a2c66b03c25eea10
6
+ metadata.gz: 0a62ed7d388386b6515c685cbeaefad0385914c4715ee8c117dc2057ed7042ca8053c05a2abb748fcd69028733975fb8458e276eb50bd8215d480c9deebbbc3b
7
+ data.tar.gz: 4057a5d3ebd48e8e5296542a5ebfa052e55cbfbc726e9bb7b931145941894a31b1b89daa69251a816935bbfe83814d41818046d2e0a23826ecd619b6588b2e13
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --exclude-limit 1000`
3
- # on 2020-03-16 18:39:58 +0200 using RuboCop version 0.74.0.
3
+ # on 2020-03-17 13:36:57 +0200 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
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.10.pre
1
+ 4.0.11
@@ -49,8 +49,8 @@ module LegacyFacter
49
49
  end
50
50
 
51
51
  def options(options)
52
- accepted_option = %i[name timeout weight fact_type]
53
- accepted_option.each do |option_name|
52
+ accepted_options = %i[name timeout weight fact_type]
53
+ accepted_options.each do |option_name|
54
54
  instance_variable_set("@#{option_name}", options.delete(option_name)) if options.key?(option_name)
55
55
  end
56
56
  raise ArgumentError, "Invalid aggregate options #{options.keys.inspect}" unless options.keys.empty?
@@ -135,12 +135,11 @@ module LegacyFacter
135
135
 
136
136
  def value(name)
137
137
  fact = fact(name)
138
-
139
- return Facter.core_value(name) if fact.nil? || fact.value.nil?
138
+ fact_value = fact&.value
139
+ return Facter.core_value(name) if fact_value.nil?
140
140
 
141
141
  core_value = Facter.core_value(name) if fact.used_resolution_weight <= 0
142
-
143
- core_value.nil? ? fact.value : core_value
142
+ core_value.nil? ? fact_value : core_value
144
143
  end
145
144
 
146
145
  private
@@ -86,9 +86,9 @@ module Facter
86
86
  end
87
87
 
88
88
  def options(options)
89
- accepted_option = %i[name value timeout weight fact_type]
89
+ accepted_options = %i[name value timeout weight fact_type]
90
90
 
91
- accepted_option.each do |option_name|
91
+ accepted_options.each do |option_name|
92
92
  instance_variable_set("@#{option_name}", options.delete(option_name)) if options.key?(option_name)
93
93
  end
94
94
 
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Aix
5
+ module Identity
6
+ class Gid
7
+ FACT_NAME = 'identity.gid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Aix
5
+ module Identity
6
+ class Group
7
+ FACT_NAME = 'identity.group'
8
+ ALIASES = 'gid'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
12
+
13
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Aix
5
+ module Identity
6
+ class Privileged
7
+ FACT_NAME = 'identity.privileged'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Aix
5
+ module Identity
6
+ class Uid
7
+ FACT_NAME = 'identity.uid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
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
+ module Identity
6
+ class Gid
7
+ FACT_NAME = 'identity.gid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Debian
5
+ module Identity
6
+ class Group
7
+ FACT_NAME = 'identity.group'
8
+ ALIASES = 'gid'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
12
+
13
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Debian
5
+ module Identity
6
+ class Privileged
7
+ FACT_NAME = 'identity.privileged'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
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
+ module Identity
6
+ class Uid
7
+ FACT_NAME = 'identity.uid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module El
5
+ module Identity
6
+ class Gid
7
+ FACT_NAME = 'identity.gid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module El
5
+ module Identity
6
+ class Group
7
+ FACT_NAME = 'identity.group'
8
+ ALIASES = 'gid'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
12
+
13
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module El
5
+ module Identity
6
+ class Privileged
7
+ FACT_NAME = 'identity.privileged'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module El
5
+ module Identity
6
+ class Uid
7
+ FACT_NAME = 'identity.uid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -9,7 +9,7 @@ module Facts
9
9
 
10
10
  def call_the_resolver
11
11
  fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
12
- Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+
13
13
  [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
14
  end
15
15
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Identity
6
+ class Gid
7
+ FACT_NAME = 'identity.gid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Identity
6
+ class Group
7
+ FACT_NAME = 'identity.group'
8
+ ALIASES = 'gid'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
12
+
13
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Identity
6
+ class Privileged
7
+ FACT_NAME = 'identity.privileged'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Identity
6
+ class Uid
7
+ FACT_NAME = 'identity.uid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ class Processor
6
+ FACT_NAME = 'processor.*'
7
+
8
+ def call_the_resolver
9
+ arr = []
10
+ processors = Facter::Resolvers::Linux::Processors.resolve(:models)
11
+
12
+ (0...processors.count).each do |iterator|
13
+ arr << Facter::ResolvedFact.new("processor#{iterator}", processors[iterator], :legacy)
14
+ end
15
+ arr
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Processors
6
+ class Count
7
+ FACT_NAME = 'processors.count'
8
+ ALIASES = 'processorscount'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::Linux::Processors.resolve(:processors)
12
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Processors
6
+ class Isa
7
+ FACT_NAME = 'processors.isa'
8
+ ALIASES = 'hardwareisa'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::Uname.resolve(:processor)
12
+ fact_value = get_isa(fact_value)
13
+
14
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
15
+ end
16
+
17
+ private
18
+
19
+ def get_isa(fact_value)
20
+ value_split = fact_value.split('.')
21
+
22
+ value_split.last
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Processors
6
+ class Models
7
+ FACT_NAME = 'processors.models'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::Linux::Processors.resolve(:models)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Sles
5
+ module Processors
6
+ class Physicalcount
7
+ FACT_NAME = 'processors.physicalcount'
8
+ ALIASES = 'physicalprocessorcount'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::Linux::Processors.resolve(:physical_count)
12
+
13
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Solaris
5
+ module Identity
6
+ class Gid
7
+ FACT_NAME = 'identity.gid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:gid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Solaris
5
+ module Identity
6
+ class Group
7
+ FACT_NAME = 'identity.group'
8
+ ALIASES = 'gid'
9
+
10
+ def call_the_resolver
11
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
12
+
13
+ [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Solaris
5
+ module Identity
6
+ class Privileged
7
+ FACT_NAME = 'identity.privileged'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:privileged)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Facts
4
+ module Solaris
5
+ module Identity
6
+ class Uid
7
+ FACT_NAME = 'identity.uid'
8
+
9
+ def call_the_resolver
10
+ fact_value = Facter::Resolvers::PosxIdentity.resolve(:uid)
11
+ Facter::ResolvedFact.new(FACT_NAME, fact_value)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ 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.10.pre
4
+ version: 4.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2020-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -250,6 +250,10 @@ files:
250
250
  - lib/facts/aix/filesystems.rb
251
251
  - lib/facts/aix/hypervisors/lpar.rb
252
252
  - lib/facts/aix/hypervisors/wpar.rb
253
+ - lib/facts/aix/identity/gid.rb
254
+ - lib/facts/aix/identity/group.rb
255
+ - lib/facts/aix/identity/privileged.rb
256
+ - lib/facts/aix/identity/uid.rb
253
257
  - lib/facts/aix/identity/user.rb
254
258
  - lib/facts/aix/kernel.rb
255
259
  - lib/facts/aix/kernelmajversion.rb
@@ -294,6 +298,10 @@ files:
294
298
  - lib/facts/debian/facterversion.rb
295
299
  - lib/facts/debian/filesystems.rb
296
300
  - lib/facts/debian/fips_enabled.rb
301
+ - lib/facts/debian/identity/gid.rb
302
+ - lib/facts/debian/identity/group.rb
303
+ - lib/facts/debian/identity/privileged.rb
304
+ - lib/facts/debian/identity/uid.rb
297
305
  - lib/facts/debian/identity/user.rb
298
306
  - lib/facts/debian/interfaces.rb
299
307
  - lib/facts/debian/kernel.rb
@@ -371,6 +379,10 @@ files:
371
379
  - lib/facts/el/facterversion.rb
372
380
  - lib/facts/el/filesystems.rb
373
381
  - lib/facts/el/fips_enabled.rb
382
+ - lib/facts/el/identity/gid.rb
383
+ - lib/facts/el/identity/group.rb
384
+ - lib/facts/el/identity/privileged.rb
385
+ - lib/facts/el/identity/uid.rb
374
386
  - lib/facts/el/identity/user.rb
375
387
  - lib/facts/el/interfaces.rb
376
388
  - lib/facts/el/kernel.rb
@@ -535,6 +547,10 @@ files:
535
547
  - lib/facts/sles/facterversion.rb
536
548
  - lib/facts/sles/filesystems.rb
537
549
  - lib/facts/sles/fips_enabled.rb
550
+ - lib/facts/sles/identity/gid.rb
551
+ - lib/facts/sles/identity/group.rb
552
+ - lib/facts/sles/identity/privileged.rb
553
+ - lib/facts/sles/identity/uid.rb
538
554
  - lib/facts/sles/identity/user.rb
539
555
  - lib/facts/sles/interfaces.rb
540
556
  - lib/facts/sles/kernel.rb
@@ -581,6 +597,11 @@ files:
581
597
  - lib/facts/sles/os/selinux/enforced.rb
582
598
  - lib/facts/sles/os/selinux/policy_version.rb
583
599
  - lib/facts/sles/path.rb
600
+ - lib/facts/sles/processor.rb
601
+ - lib/facts/sles/processors/count.rb
602
+ - lib/facts/sles/processors/isa.rb
603
+ - lib/facts/sles/processors/models.rb
604
+ - lib/facts/sles/processors/physicalcount.rb
584
605
  - lib/facts/sles/puppet_version.rb
585
606
  - lib/facts/sles/ruby/platform.rb
586
607
  - lib/facts/sles/ruby/sitedir.rb
@@ -596,6 +617,10 @@ files:
596
617
  - lib/facts/solaris/augeas/version.rb
597
618
  - lib/facts/solaris/facterversion.rb
598
619
  - lib/facts/solaris/filesystems.rb
620
+ - lib/facts/solaris/identity/gid.rb
621
+ - lib/facts/solaris/identity/group.rb
622
+ - lib/facts/solaris/identity/privileged.rb
623
+ - lib/facts/solaris/identity/uid.rb
599
624
  - lib/facts/solaris/identity/user.rb
600
625
  - lib/facts/solaris/kernel.rb
601
626
  - lib/facts/solaris/kernelmajversion.rb
@@ -856,9 +881,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
856
881
  version: '2.3'
857
882
  required_rubygems_version: !ruby/object:Gem::Requirement
858
883
  requirements:
859
- - - ">"
884
+ - - ">="
860
885
  - !ruby/object:Gem::Version
861
- version: 1.3.1
886
+ version: '0'
862
887
  requirements: []
863
888
  rubygems_version: 3.0.6
864
889
  signing_key: