facter 4.0.9.pre → 4.0.10.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rtc.yml +11 -0
- data/.rubocop_todo.yml +10 -190
- data/VERSION +1 -1
- data/facter.gemspec +1 -0
- data/lib/custom_facts/core/aggregate.rb +4 -6
- data/lib/custom_facts/core/execution.rb +1 -1
- data/lib/custom_facts/core/execution/base.rb +15 -24
- data/lib/custom_facts/core/execution/posix.rb +2 -2
- data/lib/custom_facts/core/resolvable.rb +1 -1
- data/lib/custom_facts/core/suitable.rb +2 -1
- data/lib/custom_facts/util/fact.rb +3 -3
- data/lib/custom_facts/util/loader.rb +2 -2
- data/lib/custom_facts/util/parser.rb +7 -7
- data/lib/custom_facts/util/resolution.rb +1 -3
- data/lib/custom_facts/version.rb +1 -1
- data/lib/facter.rb +217 -41
- data/lib/facts/aix/augeas/version.rb +4 -1
- data/lib/facts/aix/filesystems.rb +14 -0
- data/lib/facts/aix/identity/user.rb +17 -0
- data/lib/facts/aix/puppet_version.rb +15 -0
- data/lib/facts/aix/system_uptime/days.rb +16 -0
- data/lib/facts/aix/system_uptime/hours.rb +16 -0
- data/lib/facts/aix/system_uptime/seconds.rb +16 -0
- data/lib/facts/aix/system_uptime/uptime.rb +16 -0
- data/lib/facts/aix/timezone.rb +14 -0
- data/lib/facts/debian/augeas/version.rb +19 -0
- data/lib/facts/debian/dmi/bios/release_date.rb +2 -1
- data/lib/facts/debian/dmi/bios/vendor.rb +2 -1
- data/lib/facts/debian/dmi/bios/version.rb +2 -1
- data/lib/facts/debian/dmi/board/manufacturer.rb +2 -1
- data/lib/facts/debian/dmi/board/product.rb +2 -1
- data/lib/facts/debian/dmi/board/serial_number.rb +2 -1
- data/lib/facts/debian/dmi/chassis/asset_tag.rb +2 -1
- data/lib/facts/debian/dmi/chassis/type.rb +2 -1
- data/lib/facts/debian/dmi/manufacturer.rb +2 -1
- data/lib/facts/debian/dmi/product/name.rb +2 -1
- data/lib/facts/debian/identity/user.rb +17 -0
- data/lib/facts/debian/interfaces.rb +16 -0
- data/lib/facts/debian/memory/swap/available.rb +2 -1
- data/lib/facts/debian/memory/swap/available_bytes.rb +4 -1
- data/lib/facts/debian/memory/swap/total.rb +2 -1
- data/lib/facts/debian/memory/swap/total_bytes.rb +3 -1
- data/lib/facts/debian/memory/system/available.rb +3 -1
- data/lib/facts/debian/memory/system/available_bytes.rb +4 -1
- data/lib/facts/debian/memory/system/total.rb +2 -1
- data/lib/facts/debian/memory/system/total_bytes.rb +3 -1
- data/lib/facts/debian/networking/mac.rb +18 -0
- data/lib/facts/debian/os/distro/codename.rb +21 -0
- data/lib/facts/debian/os/distro/description.rb +21 -0
- data/lib/facts/debian/os/distro/id.rb +21 -0
- data/lib/facts/debian/os/distro/release.rb +31 -0
- data/lib/facts/debian/os/distro/specification.rb +21 -0
- data/lib/facts/debian/os/hardware.rb +2 -1
- data/lib/facts/debian/os/selinux/config_mode.rb +21 -0
- data/lib/facts/debian/os/selinux/config_policy.rb +21 -0
- data/lib/facts/debian/os/selinux/current_mode.rb +21 -0
- data/lib/facts/debian/os/selinux/enabled.rb +21 -0
- data/lib/facts/debian/os/selinux/enforced.rb +21 -0
- data/lib/facts/debian/os/selinux/policy_version.rb +21 -0
- data/lib/facts/debian/processors/count.rb +2 -1
- data/lib/facts/debian/processors/isa.rb +3 -2
- data/lib/facts/debian/processors/physicalcount.rb +2 -1
- data/lib/facts/debian/puppet_version.rb +15 -0
- data/lib/facts/debian/ruby/platform.rb +2 -1
- data/lib/facts/debian/ruby/sitedir.rb +2 -1
- data/lib/facts/debian/system_uptime/days.rb +2 -1
- data/lib/facts/debian/system_uptime/hours.rb +2 -1
- data/lib/facts/debian/system_uptime/seconds.rb +18 -0
- data/lib/facts/debian/system_uptime/uptime.rb +2 -1
- data/lib/facts/el/augeas/version.rb +19 -0
- data/lib/facts/el/dmi/bios/release_date.rb +2 -1
- data/lib/facts/el/dmi/bios/vendor.rb +2 -1
- data/lib/facts/el/dmi/bios/version.rb +2 -1
- data/lib/facts/el/dmi/board/manufacturer.rb +2 -1
- data/lib/facts/el/dmi/board/product.rb +2 -1
- data/lib/facts/el/dmi/board/serial_number.rb +2 -1
- data/lib/facts/el/dmi/chassis/asset_tag.rb +2 -1
- data/lib/facts/el/dmi/chassis/type.rb +2 -1
- data/lib/facts/el/dmi/manufacturer.rb +2 -1
- data/lib/facts/el/dmi/product/name.rb +2 -1
- data/lib/facts/el/dmi/product/serial_number.rb +2 -1
- data/lib/facts/el/dmi/product/uuid.rb +2 -1
- data/lib/facts/el/identity/user.rb +17 -0
- data/lib/facts/el/interfaces.rb +16 -0
- data/lib/facts/el/memory/swap/available.rb +2 -1
- data/lib/facts/el/memory/swap/available_bytes.rb +3 -1
- data/lib/facts/el/memory/swap/total.rb +2 -1
- data/lib/facts/el/memory/swap/total_bytes.rb +3 -1
- data/lib/facts/el/memory/system/available.rb +2 -1
- data/lib/facts/el/memory/system/available_bytes.rb +3 -1
- data/lib/facts/el/memory/system/total.rb +2 -1
- data/lib/facts/el/memory/system/total_bytes.rb +3 -1
- data/lib/facts/el/networking/mac.rb +18 -0
- data/lib/facts/el/os/distro/codename.rb +21 -0
- data/lib/facts/el/os/distro/description.rb +21 -0
- data/lib/facts/el/os/distro/id.rb +21 -0
- data/lib/facts/el/os/distro/release.rb +31 -0
- data/lib/facts/el/os/distro/specification.rb +21 -0
- data/lib/facts/el/os/hardware.rb +2 -1
- data/lib/facts/el/os/selinux/config_mode.rb +21 -0
- data/lib/facts/el/os/selinux/config_policy.rb +21 -0
- data/lib/facts/el/os/selinux/current_mode.rb +21 -0
- data/lib/facts/el/os/selinux/enabled.rb +21 -0
- data/lib/facts/el/os/selinux/enforced.rb +21 -0
- data/lib/facts/el/os/selinux/policy_version.rb +21 -0
- data/lib/facts/el/processor.rb +19 -0
- data/lib/facts/el/processors/count.rb +2 -1
- data/lib/facts/el/processors/isa.rb +3 -1
- data/lib/facts/el/processors/physicalcount.rb +3 -1
- data/lib/facts/el/puppet_version.rb +15 -0
- data/lib/facts/el/ruby/platform.rb +3 -1
- data/lib/facts/el/ruby/sitedir.rb +3 -1
- data/lib/facts/el/ruby/version.rb +1 -0
- data/lib/facts/el/sshalgorithmkey.rb +16 -0
- data/lib/facts/el/sshfp_algorithm.rb +19 -0
- data/lib/facts/el/system_uptime/days.rb +3 -1
- data/lib/facts/el/system_uptime/hours.rb +3 -1
- data/lib/facts/el/system_uptime/seconds.rb +3 -1
- data/lib/facts/el/system_uptime/uptime.rb +3 -1
- data/lib/facts/macosx/augeas/version.rb +19 -0
- data/lib/facts/macosx/dmi/product/name.rb +2 -1
- data/lib/facts/macosx/identity/group.rb +2 -0
- data/lib/facts/macosx/identity/user.rb +2 -1
- data/lib/facts/macosx/interfaces.rb +15 -0
- data/lib/facts/macosx/memory/swap/available.rb +2 -1
- data/lib/facts/macosx/memory/swap/available_bytes.rb +3 -1
- data/lib/facts/macosx/memory/swap/encrypted.rb +2 -1
- data/lib/facts/macosx/memory/swap/total.rb +2 -1
- data/lib/facts/macosx/memory/swap/total_bytes.rb +3 -1
- data/lib/facts/macosx/memory/system/available.rb +2 -1
- data/lib/facts/macosx/memory/system/available_bytes.rb +3 -1
- data/lib/facts/macosx/memory/system/total.rb +2 -1
- data/lib/facts/macosx/memory/system/total_bytes.rb +3 -1
- data/lib/facts/macosx/networking/mac.rb +18 -0
- data/lib/facts/macosx/os/hardware.rb +2 -1
- data/lib/facts/macosx/os/macosx/build.rb +2 -2
- data/lib/facts/macosx/os/macosx/product.rb +2 -2
- data/lib/facts/macosx/os/macosx/version.rb +5 -1
- data/lib/facts/macosx/os/release.rb +11 -5
- data/lib/facts/macosx/processors/count.rb +2 -1
- data/lib/facts/macosx/processors/isa.rb +2 -1
- data/lib/facts/macosx/processors/models.rb +6 -1
- data/lib/facts/macosx/processors/physicalcount.rb +2 -1
- data/lib/facts/macosx/{augeas.rb → puppet_version.rb} +4 -3
- data/lib/facts/macosx/ruby/platform.rb +2 -2
- data/lib/facts/macosx/ruby/sitedir.rb +2 -2
- data/lib/facts/macosx/ssh.rb +26 -0
- data/lib/facts/macosx/sshalgorithmkey.rb +16 -0
- data/lib/facts/macosx/sshfp_algorithm.rb +19 -0
- data/lib/facts/macosx/system_profiler/boot_mode.rb +2 -1
- data/lib/facts/macosx/system_profiler/boot_rom_version.rb +2 -1
- data/lib/facts/macosx/system_profiler/boot_volume.rb +2 -1
- data/lib/facts/macosx/system_profiler/computer_name.rb +2 -1
- data/lib/facts/macosx/system_profiler/cores.rb +2 -1
- data/lib/facts/macosx/system_profiler/hardware_uuid.rb +2 -1
- data/lib/facts/macosx/system_profiler/kernel_version.rb +2 -1
- data/lib/facts/macosx/system_profiler/l2_cache_per_core.rb +2 -1
- data/lib/facts/macosx/system_profiler/l3_cache.rb +2 -1
- data/lib/facts/macosx/system_profiler/memory.rb +2 -1
- data/lib/facts/macosx/system_profiler/model_identifier.rb +2 -1
- data/lib/facts/macosx/system_profiler/model_name.rb +2 -1
- data/lib/facts/macosx/system_profiler/processor_name.rb +2 -1
- data/lib/facts/macosx/system_profiler/processor_speed.rb +2 -1
- data/lib/facts/macosx/system_profiler/processors.rb +2 -1
- data/lib/facts/macosx/system_profiler/secure_virtual_memory.rb +2 -1
- data/lib/facts/macosx/system_profiler/serial_number.rb +2 -1
- data/lib/facts/macosx/system_profiler/smc_version.rb +2 -1
- data/lib/facts/macosx/system_profiler/system_version.rb +2 -1
- data/lib/facts/macosx/system_profiler/uptime.rb +2 -1
- data/lib/facts/macosx/system_profiler/username.rb +2 -1
- data/lib/facts/macosx/system_uptime/days.rb +2 -1
- data/lib/facts/macosx/system_uptime/hours.rb +2 -1
- data/lib/facts/macosx/system_uptime/seconds.rb +2 -1
- data/lib/facts/macosx/system_uptime/uptime.rb +2 -1
- data/lib/facts/sles/augeas/version.rb +19 -0
- data/lib/facts/sles/disks.rb +15 -0
- data/lib/facts/sles/dmi/bios/release_date.rb +19 -0
- data/lib/facts/sles/dmi/bios/vendor.rb +19 -0
- data/lib/facts/sles/dmi/bios/version.rb +19 -0
- data/lib/facts/sles/dmi/board/manufacturer.rb +19 -0
- data/lib/facts/sles/dmi/board/product.rb +19 -0
- data/lib/facts/sles/dmi/board/serial_number.rb +19 -0
- data/lib/facts/sles/dmi/chassis/asset_tag.rb +19 -0
- data/lib/facts/sles/dmi/chassis/type.rb +19 -0
- data/lib/facts/sles/dmi/manufacturer.rb +17 -0
- data/lib/facts/sles/dmi/product/name.rb +19 -0
- data/lib/facts/sles/dmi/product/serial_number.rb +19 -0
- data/lib/facts/sles/dmi/product/uuid.rb +19 -0
- data/lib/facts/sles/filesystems.rb +14 -0
- data/lib/facts/sles/fips_enabled.rb +14 -0
- data/lib/facts/sles/identity/user.rb +17 -0
- data/lib/facts/sles/interfaces.rb +16 -0
- data/lib/facts/sles/load_averages.rb +14 -0
- data/lib/facts/sles/memory/swap/available.rb +2 -1
- data/lib/facts/sles/memory/swap/available_bytes.rb +3 -1
- data/lib/facts/sles/memory/swap/total.rb +2 -1
- data/lib/facts/sles/memory/swap/total_bytes.rb +3 -1
- data/lib/facts/sles/memory/swap/used.rb +1 -1
- data/lib/facts/sles/memory/swap/used_bytes.rb +1 -1
- data/lib/facts/sles/memory/system/available.rb +2 -1
- data/lib/facts/sles/memory/system/available_bytes.rb +3 -1
- data/lib/facts/sles/memory/system/total.rb +2 -1
- data/lib/facts/sles/memory/system/total_bytes.rb +3 -1
- data/lib/facts/sles/mountpoints.rb +21 -0
- data/lib/facts/sles/networking/mac.rb +18 -0
- data/lib/facts/sles/os/distro/codename.rb +21 -0
- data/lib/facts/sles/os/distro/description.rb +21 -0
- data/lib/facts/sles/os/distro/id.rb +21 -0
- data/lib/facts/sles/os/distro/release.rb +31 -0
- data/lib/facts/sles/os/distro/specification.rb +21 -0
- data/lib/facts/sles/os/family.rb +1 -1
- data/lib/facts/sles/os/hardware.rb +2 -1
- data/lib/facts/sles/os/release.rb +3 -3
- data/lib/facts/sles/os/selinux/config_mode.rb +21 -0
- data/lib/facts/sles/os/selinux/config_policy.rb +21 -0
- data/lib/facts/sles/os/selinux/current_mode.rb +21 -0
- data/lib/facts/sles/os/selinux/enabled.rb +21 -0
- data/lib/facts/sles/os/selinux/enforced.rb +21 -0
- data/lib/facts/sles/os/selinux/policy_version.rb +21 -0
- data/lib/facts/sles/puppet_version.rb +15 -0
- data/lib/facts/sles/ruby/platform.rb +3 -1
- data/lib/facts/sles/ruby/sitedir.rb +3 -1
- data/lib/facts/sles/ruby/version.rb +1 -0
- data/lib/facts/sles/sshalgorithmkey.rb +16 -0
- data/lib/facts/sles/sshfp_algorithm.rb +19 -0
- data/lib/facts/sles/system_uptime/days.rb +18 -0
- data/lib/facts/sles/system_uptime/hours.rb +18 -0
- data/lib/facts/sles/system_uptime/seconds.rb +18 -0
- data/lib/facts/sles/system_uptime/uptime.rb +18 -0
- data/lib/facts/solaris/augeas/version.rb +19 -0
- data/lib/facts/solaris/filesystems.rb +14 -0
- data/lib/facts/solaris/identity/user.rb +17 -0
- data/lib/facts/solaris/os/hardware.rb +3 -1
- data/lib/facts/solaris/puppet_version.rb +15 -0
- data/lib/facts/solaris/ruby/platform.rb +3 -1
- data/lib/facts/solaris/ruby/sitedir.rb +2 -1
- data/lib/facts/solaris/solaris_zones/current.rb +3 -1
- data/lib/facts/solaris/solaris_zones/zone.rb +39 -6
- data/lib/facts/solaris/ssh.rb +26 -0
- data/lib/facts/solaris/system_uptime/days.rb +17 -0
- data/lib/facts/solaris/system_uptime/hours.rb +17 -0
- data/lib/facts/{debian/system_uptime/minutes.rb → solaris/system_uptime/seconds.rb} +4 -4
- data/lib/facts/solaris/system_uptime/uptime.rb +17 -0
- data/lib/facts/solaris/timezone.rb +14 -0
- data/lib/facts/windows/augeas/version.rb +19 -0
- data/lib/facts/windows/puppet_version.rb +15 -0
- data/lib/facts_utils/bytes_converter.rb +15 -0
- data/lib/framework/config/block_list.rb +1 -1
- data/lib/framework/config/config_reader.rb +1 -1
- data/lib/framework/core/fact/external/external_fact_manager.rb +1 -1
- data/lib/framework/core/fact_loaders/external_fact_loader.rb +1 -1
- data/lib/framework/core/fact_manager.rb +5 -0
- data/lib/framework/logging/logger.rb +10 -1
- data/lib/models/fact_collection.rb +15 -1
- data/lib/models/resolved_fact.rb +5 -1
- data/lib/resolvers/aix/filesystem_resolver.rb +33 -0
- data/lib/resolvers/disk_resolver.rb +11 -3
- data/lib/resolvers/dmi_resolver.rb +1 -1
- data/lib/resolvers/filesystems_resolver.rb +2 -0
- data/lib/resolvers/fips_enabled_resolver.rb +2 -1
- data/lib/resolvers/hostname_resolver.rb +1 -1
- data/lib/resolvers/load_averages_resolver.rb +2 -0
- data/lib/resolvers/lsb_release_resolver.rb +23 -5
- data/lib/resolvers/macosx/ipaddress_resolver.rb +14 -1
- data/lib/resolvers/memory_resolver.rb +2 -0
- data/lib/resolvers/mountpoints_resolver.rb +2 -0
- data/lib/resolvers/networking_linux_resolver.rb +7 -1
- data/lib/resolvers/os_release_resolver.rb +1 -1
- data/lib/resolvers/processors_resolver.rb +2 -0
- data/lib/resolvers/puppet_version_resolver.rb +27 -0
- data/lib/resolvers/selinux_resolver.rb +36 -4
- data/lib/resolvers/solaris/filesystems_resolver.rb +32 -0
- data/lib/resolvers/solaris/zone_resolver.rb +4 -4
- data/lib/resolvers/ssh_resolver.rb +1 -1
- metadata +123 -8
- data/lib/facts/debian/os/distro.rb +0 -31
- data/lib/facts/debian/os/selinux.rb +0 -23
- data/lib/facts/el/os/selinux.rb +0 -23
- data/lib/facts/sles/os/selinux.rb +0 -23
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Distro
|
7
|
+
class Description
|
8
|
+
FACT_NAME = 'os.distro.description'
|
9
|
+
ALIASES = 'lsbdistdescription'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:description)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Distro
|
7
|
+
class Id
|
8
|
+
FACT_NAME = 'os.distro.id'
|
9
|
+
ALIASES = 'lsbdistid'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:distributor_id)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Distro
|
7
|
+
class Release
|
8
|
+
FACT_NAME = 'os.distro.release'
|
9
|
+
ALIASES = %w[lsbdistrelease lsbmajdistrelease lsbminordistrelease].freeze
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:release)
|
13
|
+
return Facter::ResolvedFact.new(FACT_NAME, nil) unless fact_value
|
14
|
+
|
15
|
+
versions = fact_value.split('.')
|
16
|
+
release = {
|
17
|
+
'full' => fact_value,
|
18
|
+
'major' => versions[0],
|
19
|
+
'minor' => versions[1]
|
20
|
+
}
|
21
|
+
|
22
|
+
[Facter::ResolvedFact.new(FACT_NAME, release),
|
23
|
+
Facter::ResolvedFact.new(ALIASES[0], fact_value, :legacy),
|
24
|
+
Facter::ResolvedFact.new(ALIASES[1], versions[0], :legacy),
|
25
|
+
Facter::ResolvedFact.new(ALIASES[2], versions[1], :legacy)]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Distro
|
7
|
+
class Specification
|
8
|
+
FACT_NAME = 'os.distro.specification'
|
9
|
+
ALIASES = 'lsbrelease'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::LsbRelease.resolve(:lsb_version)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/facts/sles/os/family.rb
CHANGED
@@ -8,7 +8,7 @@ module Facts
|
|
8
8
|
ALIASES = 'osfamily'
|
9
9
|
|
10
10
|
def call_the_resolver
|
11
|
-
[Facter::ResolvedFact.new(FACT_NAME, '
|
11
|
+
[Facter::ResolvedFact.new(FACT_NAME, 'Suse'), Facter::ResolvedFact.new(ALIASES, 'Suse', :legacy)]
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -5,11 +5,12 @@ module Facts
|
|
5
5
|
module Os
|
6
6
|
class Hardware
|
7
7
|
FACT_NAME = 'os.hardware'
|
8
|
+
ALIASES = 'hardwaremodel'
|
8
9
|
|
9
10
|
def call_the_resolver
|
10
11
|
fact_value = Facter::Resolvers::Uname.resolve(:machine)
|
11
12
|
|
12
|
-
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
13
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
13
14
|
end
|
14
15
|
end
|
15
16
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Selinux
|
7
|
+
class ConfigMode
|
8
|
+
FACT_NAME = 'os.selinux.config_mode'
|
9
|
+
ALIASES = 'selinux_config_mode'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::SELinux.resolve(:config_mode)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Selinux
|
7
|
+
class ConfigPolicy
|
8
|
+
FACT_NAME = 'os.selinux.config_policy'
|
9
|
+
ALIASES = 'selinux_config_policy'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::SELinux.resolve(:config_policy)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Selinux
|
7
|
+
class CurrentMode
|
8
|
+
FACT_NAME = 'os.selinux.current_mode'
|
9
|
+
ALIASES = 'selinux_current_mode'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::SELinux.resolve(:current_mode)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Selinux
|
7
|
+
class Enabled
|
8
|
+
FACT_NAME = 'os.selinux.enabled'
|
9
|
+
ALIASES = 'selinux'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
selinux = Facter::Resolvers::SELinux.resolve(:enabled)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, selinux),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, selinux, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Selinux
|
7
|
+
class Enforced
|
8
|
+
FACT_NAME = 'os.selinux.enforced'
|
9
|
+
ALIASES = 'selinux_enforced'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::SELinux.resolve(:enforced)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module Os
|
6
|
+
module Selinux
|
7
|
+
class PolicyVersion
|
8
|
+
FACT_NAME = 'os.selinux.policy_version'
|
9
|
+
ALIASES = 'selinux_policyversion'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = Facter::Resolvers::SELinux.resolve(:policy_version)
|
13
|
+
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
15
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
class PuppetVersion
|
6
|
+
FACT_NAME = 'puppetversion'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
fact_value = Facter::Resolvers::PuppetVersionResolver.resolve(:puppetversion)
|
10
|
+
|
11
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -5,10 +5,12 @@ module Facts
|
|
5
5
|
module Ruby
|
6
6
|
class Platform
|
7
7
|
FACT_NAME = 'ruby.platform'
|
8
|
+
ALIASES = 'rubyplatform'
|
8
9
|
|
9
10
|
def call_the_resolver
|
10
11
|
fact_value = Facter::Resolvers::Ruby.resolve(:platform)
|
11
|
-
|
12
|
+
|
13
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -5,10 +5,12 @@ module Facts
|
|
5
5
|
module Ruby
|
6
6
|
class Sitedir
|
7
7
|
FACT_NAME = 'ruby.sitedir'
|
8
|
+
ALIASES = 'rubysitedir'
|
8
9
|
|
9
10
|
def call_the_resolver
|
10
11
|
fact_value = Facter::Resolvers::Ruby.resolve(:sitedir)
|
11
|
-
|
12
|
+
|
13
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
class Sshalgorithmkey
|
6
|
+
FACT_NAME = 'ssh.*key'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
facts = []
|
10
|
+
result = Facter::Resolvers::SshResolver.resolve(:ssh)
|
11
|
+
result.each { |ssh| facts << Facter::ResolvedFact.new("ssh#{ssh.name.to_sym}key", ssh.key, :legacy) }
|
12
|
+
facts
|
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 SshfpAlgorithm
|
6
|
+
FACT_NAME = 'sshfp_.*'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
facts = []
|
10
|
+
result = Facter::Resolvers::SshResolver.resolve(:ssh)
|
11
|
+
result.each do |ssh|
|
12
|
+
facts << Facter::ResolvedFact.new("sshfp_#{ssh.name.to_sym}",
|
13
|
+
"#{ssh.fingerprint.sha1} \n #{ssh.fingerprint.sha256}", :legacy)
|
14
|
+
end
|
15
|
+
facts
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module SystemUptime
|
6
|
+
class Days
|
7
|
+
FACT_NAME = 'system_uptime.days'
|
8
|
+
ALIASES = 'uptime_days'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Uptime.resolve(:days)
|
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,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module SystemUptime
|
6
|
+
class Hours
|
7
|
+
FACT_NAME = 'system_uptime.hours'
|
8
|
+
ALIASES = 'uptime_hours'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Uptime.resolve(:hours)
|
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,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module SystemUptime
|
6
|
+
class Seconds
|
7
|
+
FACT_NAME = 'system_uptime.seconds'
|
8
|
+
ALIASES = 'uptime_seconds'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Uptime.resolve(:seconds)
|
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,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Sles
|
5
|
+
module SystemUptime
|
6
|
+
class Uptime
|
7
|
+
FACT_NAME = 'system_uptime.uptime'
|
8
|
+
ALIASES = 'uptime'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Uptime.resolve(:uptime)
|
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
|