facter 4.0.38 → 4.0.43
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/facter +3 -4
- data/lib/facter.rb +138 -27
- data/lib/facter/custom_facts/core/aggregate.rb +51 -17
- data/lib/facter/custom_facts/core/execution.rb +27 -35
- data/lib/facter/custom_facts/core/execution/base.rb +42 -6
- data/lib/facter/custom_facts/util/directory_loader.rb +1 -1
- data/lib/facter/custom_facts/util/resolution.rb +40 -11
- data/lib/facter/facts/aix/disks.rb +1 -1
- data/lib/facter/facts/aix/kernel.rb +1 -1
- data/lib/facter/facts/aix/kernelmajversion.rb +1 -1
- data/lib/facter/facts/aix/kernelrelease.rb +1 -1
- data/lib/facter/facts/aix/kernelversion.rb +1 -1
- data/lib/facter/facts/aix/os/release.rb +1 -1
- data/lib/facter/facts/linux/cloud.rb +15 -0
- data/lib/facter/facts/linux/disks.rb +1 -1
- data/lib/facter/facts/linux/ec2_metadata.rb +5 -27
- data/lib/facter/facts/linux/ec2_userdata.rb +5 -27
- data/lib/facter/facts/linux/is_virtual.rb +7 -46
- data/lib/facter/facts/linux/virtual.rb +3 -58
- data/lib/facter/facts/solaris/disks.rb +1 -1
- data/lib/facter/facts/solaris/zones.rb +1 -1
- data/lib/facter/facts_utils/virtual_detector.rb +78 -0
- data/lib/facter/framework/cli/cli.rb +83 -36
- data/lib/facter/framework/cli/cli_launcher.rb +34 -38
- data/lib/facter/framework/config/fact_groups.rb +36 -2
- data/lib/facter/framework/core/cache_manager.rb +40 -23
- data/lib/facter/framework/core/fact_loaders/fact_loader.rb +14 -11
- data/lib/facter/framework/core/options/config_file_options.rb +5 -3
- data/lib/facter/framework/core/options/option_store.rb +27 -10
- data/lib/facter/framework/logging/logger.rb +1 -5
- data/lib/facter/patches/sysfilesystem/sys/statvfs.rb +92 -0
- data/lib/facter/resolvers/aix/os_level.rb +27 -0
- data/lib/facter/resolvers/cloud.rb +39 -0
- data/lib/facter/resolvers/dmi_decode.rb +1 -0
- data/lib/facter/resolvers/dmi_resolver.rb +2 -2
- data/lib/facter/resolvers/memory_resolver.rb +12 -14
- data/lib/facter/resolvers/mountpoints_resolver.rb +5 -2
- data/lib/facter/resolvers/networking_linux_resolver.rb +10 -5
- data/lib/facter/resolvers/processors_resolver.rb +5 -1
- data/lib/facter/resolvers/solaris/mountpoints.rb +60 -0
- data/lib/facter/resolvers/solaris/networking.rb +1 -1
- data/lib/facter/resolvers/utils/filesystem_helper.rb +3 -1
- data/lib/facter/version.rb +1 -1
- metadata +8 -4
- data/lib/facter/resolvers/aix/os_level_resolver.rb +0 -25
- data/lib/facter/resolvers/os_level_resolver.rb +0 -28
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Facter
|
4
|
-
module Resolvers
|
5
|
-
class OsLevel < BaseResolver
|
6
|
-
@fact_list ||= {}
|
7
|
-
|
8
|
-
class << self
|
9
|
-
private
|
10
|
-
|
11
|
-
def post_resolve(fact_name)
|
12
|
-
@fact_list.fetch(fact_name) { read_oslevel(fact_name) }
|
13
|
-
end
|
14
|
-
|
15
|
-
def read_oslevel(fact_name)
|
16
|
-
output = Facter::Core::Execution.execute('/usr/bin/oslevel -s', logger: log)
|
17
|
-
@fact_list[:build] = output
|
18
|
-
@fact_list[:kernel] = 'AIX'
|
19
|
-
|
20
|
-
@fact_list[fact_name]
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Facter
|
4
|
-
module Resolvers
|
5
|
-
class OsLevel < BaseResolver
|
6
|
-
# build
|
7
|
-
|
8
|
-
@fact_list ||= {}
|
9
|
-
|
10
|
-
class << self
|
11
|
-
private
|
12
|
-
|
13
|
-
def post_resolve(fact_name)
|
14
|
-
@fact_list.fetch(fact_name) { read_oslevel(fact_name) }
|
15
|
-
end
|
16
|
-
|
17
|
-
def read_oslevel(fact_name)
|
18
|
-
output = Facter::Core::Execution.execute('/usr/bin/oslevel -s', logger: log)
|
19
|
-
|
20
|
-
@fact_list[:build] = output unless output.empty?
|
21
|
-
@fact_list[:kernel] = 'AIX'
|
22
|
-
|
23
|
-
@fact_list[fact_name]
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|