facter 4.0.44 → 4.0.46
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/facter.rb +15 -1
- data/lib/facter/config.rb +1 -0
- data/lib/facter/custom_facts/core/execution.rb +28 -4
- data/lib/facter/custom_facts/core/execution/base.rb +33 -33
- data/lib/facter/custom_facts/util/parser.rb +17 -3
- data/lib/facter/facts/solaris/hypervisors/ldom.rb +3 -0
- data/lib/facter/facts/solaris/ldom.rb +4 -1
- data/lib/facter/framework/cli/cli.rb +19 -5
- data/lib/facter/framework/config/fact_groups.rb +5 -3
- data/lib/facter/framework/core/cache_manager.rb +57 -15
- data/lib/facter/framework/core/fact/internal/core_fact.rb +6 -1
- data/lib/facter/framework/core/fact/internal/internal_fact_manager.rb +38 -4
- data/lib/facter/framework/core/fact_augmenter.rb +1 -1
- data/lib/facter/framework/core/fact_loaders/fact_loader.rb +1 -1
- data/lib/facter/framework/core/fact_manager.rb +1 -1
- data/lib/facter/framework/core/options/config_file_options.rb +16 -5
- data/lib/facter/framework/core/options/option_store.rb +7 -3
- data/lib/facter/resolvers/aio_agent_version.rb +1 -1
- data/lib/facter/resolvers/aix/architecture_resolver.rb +2 -1
- data/lib/facter/resolvers/aix/disks.rb +2 -1
- data/lib/facter/resolvers/aix/filesystem_resolver.rb +1 -1
- data/lib/facter/resolvers/aix/hardware_resolver.rb +2 -1
- data/lib/facter/resolvers/aix/load_averages_resolver.rb +2 -1
- data/lib/facter/resolvers/aix/memory.rb +2 -1
- data/lib/facter/resolvers/aix/mountpoints.rb +2 -1
- data/lib/facter/resolvers/aix/networking_resolver.rb +1 -1
- data/lib/facter/resolvers/aix/nim.rb +1 -1
- data/lib/facter/resolvers/aix/os_level.rb +1 -1
- data/lib/facter/resolvers/aix/partitions.rb +2 -1
- data/lib/facter/resolvers/aix/processors.rb +2 -1
- data/lib/facter/resolvers/aix/serialnumber.rb +1 -1
- data/lib/facter/resolvers/augeas_resolver.rb +1 -1
- data/lib/facter/resolvers/base_resolver.rb +11 -4
- data/lib/facter/resolvers/bsd/processors.rb +2 -1
- data/lib/facter/resolvers/cloud.rb +1 -1
- data/lib/facter/resolvers/containers.rb +2 -1
- data/lib/facter/resolvers/debian_version.rb +1 -1
- data/lib/facter/resolvers/disk_resolver.rb +4 -1
- data/lib/facter/resolvers/dmi_decode.rb +1 -1
- data/lib/facter/resolvers/dmi_resolver.rb +2 -1
- data/lib/facter/resolvers/ec2.rb +2 -1
- data/lib/facter/resolvers/eos_release_resolver.rb +1 -1
- data/lib/facter/resolvers/facterversion_resolver.rb +1 -1
- data/lib/facter/resolvers/filesystems_resolver.rb +4 -1
- data/lib/facter/resolvers/fips_enabled_resolver.rb +4 -1
- data/lib/facter/resolvers/freebsd/dmi_resolver.rb +1 -1
- data/lib/facter/resolvers/freebsd/freebsd_version_resolver.rb +9 -7
- data/lib/facter/resolvers/freebsd/geom_resolver.rb +2 -1
- data/lib/facter/resolvers/freebsd/processors.rb +2 -1
- data/lib/facter/resolvers/freebsd/swap_memory_resolver.rb +2 -1
- data/lib/facter/resolvers/freebsd/system_memory_resolver.rb +2 -1
- data/lib/facter/resolvers/gce.rb +2 -1
- data/lib/facter/resolvers/hostname_resolver.rb +2 -1
- data/lib/facter/resolvers/identity_resolver.rb +2 -1
- data/lib/facter/resolvers/linux/docker_uptime.rb +2 -1
- data/lib/facter/resolvers/linux/load_averages.rb +2 -1
- data/lib/facter/resolvers/load_averages.rb +2 -1
- data/lib/facter/resolvers/lpar_resolver.rb +1 -1
- data/lib/facter/resolvers/lsb_release_resolver.rb +1 -1
- data/lib/facter/resolvers/lspci.rb +1 -1
- data/lib/facter/resolvers/macosx/dmi_resolver.rb +1 -1
- data/lib/facter/resolvers/macosx/filesystems_resolver.rb +1 -1
- data/lib/facter/resolvers/macosx/load_averages_resolver.rb +2 -1
- data/lib/facter/resolvers/macosx/mountpoints_resolver.rb +2 -1
- data/lib/facter/resolvers/macosx/processor_resolver.rb +2 -1
- data/lib/facter/resolvers/macosx/swap_memory_resolver.rb +2 -1
- data/lib/facter/resolvers/macosx/system_memory_resolver.rb +2 -1
- data/lib/facter/resolvers/macosx/system_profiler_resolver.rb +1 -3
- data/lib/facter/resolvers/memory_resolver.rb +3 -1
- data/lib/facter/resolvers/mountpoints_resolver.rb +4 -1
- data/lib/facter/resolvers/networking_linux_resolver.rb +5 -4
- data/lib/facter/resolvers/networking_resolver.rb +1 -1
- data/lib/facter/resolvers/open_vz.rb +1 -1
- data/lib/facter/resolvers/os_release_resolver.rb +1 -1
- data/lib/facter/resolvers/partitions.rb +2 -1
- data/lib/facter/resolvers/path_resolver.rb +1 -1
- data/lib/facter/resolvers/processors_resolver.rb +4 -1
- data/lib/facter/resolvers/puppet_version_resolver.rb +1 -1
- data/lib/facter/resolvers/redhat_release_resolver.rb +1 -1
- data/lib/facter/resolvers/ruby_resolver.rb +1 -1
- data/lib/facter/resolvers/selinux_resolver.rb +1 -1
- data/lib/facter/resolvers/solaris/disks.rb +1 -1
- data/lib/facter/resolvers/solaris/dmi.rb +1 -1
- data/lib/facter/resolvers/solaris/dmi_sparc.rb +1 -1
- data/lib/facter/resolvers/solaris/filesystems.rb +1 -1
- data/lib/facter/resolvers/solaris/ipaddress.rb +2 -1
- data/lib/facter/resolvers/solaris/ldom.rb +1 -3
- data/lib/facter/resolvers/solaris/memory.rb +2 -1
- data/lib/facter/resolvers/solaris/mountpoints.rb +2 -2
- data/lib/facter/resolvers/solaris/networking.rb +1 -1
- data/lib/facter/resolvers/solaris/os_release.rb +2 -1
- data/lib/facter/resolvers/solaris/processors.rb +2 -1
- data/lib/facter/resolvers/solaris/zone.rb +1 -1
- data/lib/facter/resolvers/solaris/zone_name.rb +1 -1
- data/lib/facter/resolvers/ssh_resolver.rb +4 -1
- data/lib/facter/resolvers/suse_release_resolver.rb +1 -1
- data/lib/facter/resolvers/sw_vers_resolver.rb +2 -2
- data/lib/facter/resolvers/timezone_resolver.rb +1 -1
- data/lib/facter/resolvers/uname_resolver.rb +1 -1
- data/lib/facter/resolvers/uptime_resolver.rb +1 -1
- data/lib/facter/resolvers/utils/networking.rb +2 -0
- data/lib/facter/resolvers/virt_what.rb +1 -1
- data/lib/facter/resolvers/vmware.rb +1 -1
- data/lib/facter/resolvers/windows/aio_agent_version.rb +1 -1
- data/lib/facter/resolvers/windows/dmi_bios_resolver.rb +1 -1
- data/lib/facter/resolvers/windows/dmi_computersystem_resolver.rb +1 -1
- data/lib/facter/resolvers/windows/fips_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/hardware_architecture_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/identity_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/kernel_resolver.rb +3 -1
- data/lib/facter/resolvers/windows/memory_resolver.rb +3 -1
- data/lib/facter/resolvers/windows/netkvm_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/networking_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/processors_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/product_release_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/ssh.rb +3 -1
- data/lib/facter/resolvers/windows/system32_resolver.rb +3 -1
- data/lib/facter/resolvers/windows/uptime_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/virtualization_resolver.rb +2 -1
- data/lib/facter/resolvers/windows/win_os_description_resolver.rb +3 -1
- data/lib/facter/resolvers/wpar_resolver.rb +1 -1
- data/lib/facter/resolvers/xen.rb +1 -1
- data/lib/facter/resolvers/zfs.rb +2 -1
- data/lib/facter/resolvers/zpool.rb +2 -1
- data/lib/facter/version.rb +1 -1
- metadata +4 -3
data/lib/facter/resolvers/ec2.rb
CHANGED
@@ -4,7 +4,7 @@ module Facter
|
|
4
4
|
module Resolvers
|
5
5
|
module Freebsd
|
6
6
|
class FreebsdVersion < BaseResolver
|
7
|
-
|
7
|
+
init_resolver
|
8
8
|
|
9
9
|
class << self
|
10
10
|
private
|
@@ -14,10 +14,13 @@ module Facter
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def freebsd_version_system_call(fact_name)
|
17
|
-
output = Facter::Core::Execution.execute('/bin/freebsd-version -
|
18
|
-
return if output.empty?
|
17
|
+
output = Facter::Core::Execution.execute('/bin/freebsd-version -k', logger: log)
|
19
18
|
|
20
|
-
|
19
|
+
@fact_list[:installed_kernel] = output.strip unless output.empty?
|
20
|
+
|
21
|
+
output = Facter::Core::Execution.execute('/bin/freebsd-version -ru', logger: log)
|
22
|
+
|
23
|
+
build_fact_list(output) unless output.empty?
|
21
24
|
|
22
25
|
@fact_list[fact_name]
|
23
26
|
end
|
@@ -25,9 +28,8 @@ module Facter
|
|
25
28
|
def build_fact_list(output)
|
26
29
|
freebsd_version_results = output.split("\n")
|
27
30
|
|
28
|
-
@fact_list[:
|
29
|
-
@fact_list[:
|
30
|
-
@fact_list[:installed_userland] = freebsd_version_results[2].strip
|
31
|
+
@fact_list[:running_kernel] = freebsd_version_results[0].strip
|
32
|
+
@fact_list[:installed_userland] = freebsd_version_results[1].strip
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
@@ -4,7 +4,8 @@ module Facter
|
|
4
4
|
module Resolvers
|
5
5
|
module Freebsd
|
6
6
|
class Geom < BaseResolver
|
7
|
-
|
7
|
+
init_resolver
|
8
|
+
|
8
9
|
DISKS_ATTRIBUTES = %i[read_model read_serial_number read_size].freeze
|
9
10
|
PARTITIONS_ATTRIBUTES = %i[read_partlabel read_partuuid read_size].freeze
|
10
11
|
|
data/lib/facter/resolvers/gce.rb
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
module Facter
|
4
4
|
module Resolvers
|
5
5
|
class Gce < BaseResolver
|
6
|
-
|
6
|
+
init_resolver
|
7
|
+
|
7
8
|
METADATA_URL = 'http://metadata.google.internal/computeMetadata/v1/?recursive=true&alt=json'
|
8
9
|
HEADERS = { "Metadata-Flavor": 'Google', "Accept": 'application/json' }.freeze
|
9
10
|
|
@@ -15,7 +15,7 @@ module Facter
|
|
15
15
|
SP_ETHERNET_DATA_TYPE = %i[type bus vendor_id device_id subsystem_vendor_id
|
16
16
|
subsystem_id revision_id bsd_name kext_name location version].freeze
|
17
17
|
|
18
|
-
|
18
|
+
init_resolver
|
19
19
|
|
20
20
|
class << self
|
21
21
|
private
|
@@ -25,8 +25,6 @@ module Facter
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def retrieve_system_profiler(fact_name)
|
28
|
-
@fact_list ||= {}
|
29
|
-
|
30
28
|
case fact_name
|
31
29
|
when *SP_HARDWARE_DATA_TYPE
|
32
30
|
@fact_list.merge!(SystemProfileExecutor.execute('SPHardwareDataType'))
|
@@ -3,7 +3,8 @@
|
|
3
3
|
module Facter
|
4
4
|
module Resolvers
|
5
5
|
class NetworkingLinux < BaseResolver
|
6
|
-
|
6
|
+
init_resolver
|
7
|
+
|
7
8
|
DIRS = ['/var/lib/dhclient/', '/var/lib/dhcp/', '/var/lib/dhcp3/', '/var/lib/NetworkManager/', '/var/db/'].freeze
|
8
9
|
|
9
10
|
class << self
|
@@ -16,8 +17,6 @@ module Facter
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def retrieve_network_info(fact_name)
|
19
|
-
@fact_list ||= {}
|
20
|
-
|
21
20
|
retrieve_interface_info
|
22
21
|
retrieve_interfaces_mac_and_mtu
|
23
22
|
retrieve_default_interface
|
@@ -113,6 +112,8 @@ module Facter
|
|
113
112
|
"ip4_mask_length = #{ip4_mask_length}")
|
114
113
|
|
115
114
|
binding = ::Resolvers::Utils::Networking.build_binding(ip4_address, ip4_mask_length)
|
115
|
+
return unless binding
|
116
|
+
|
116
117
|
build_network_info_structure!(network_info, interface_name, :bindings)
|
117
118
|
|
118
119
|
network_info[interface_name][:bindings] << binding
|
@@ -120,7 +121,7 @@ module Facter
|
|
120
121
|
|
121
122
|
def retrieve_name_and_ip_info(tokens)
|
122
123
|
interface_name = tokens[1]
|
123
|
-
ip_info = tokens[3].split('/')
|
124
|
+
ip_info = tokens[4] =~ /peer/ ? tokens[5].split('/') : tokens[3].split('/')
|
124
125
|
ip_address = ip_info[0]
|
125
126
|
ip_mask_length = ip_info[1]
|
126
127
|
|