facter 4.0.34 → 4.0.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/facter/facts/aix/ssh.rb +3 -1
- data/lib/facter/facts/freebsd/augeas/version.rb +19 -0
- data/lib/facter/facts/freebsd/facterversion.rb +14 -0
- data/lib/facter/facts/freebsd/identity/gid.rb +16 -0
- data/lib/facter/facts/{solaris/solaris_zones/current.rb → freebsd/identity/group.rb} +6 -6
- data/lib/facter/facts/freebsd/identity/privileged.rb +16 -0
- data/lib/facter/facts/freebsd/identity/uid.rb +16 -0
- data/lib/facter/facts/freebsd/identity/user.rb +17 -0
- data/lib/facter/facts/freebsd/kernel.rb +14 -0
- data/lib/facter/facts/freebsd/kernelrelease.rb +14 -0
- data/lib/facter/facts/freebsd/mountpoints.rb +21 -0
- data/lib/facter/facts/freebsd/netmask6_interfaces.rb +20 -0
- data/lib/facter/facts/freebsd/netmask_interfaces.rb +20 -0
- data/lib/facter/facts/freebsd/network6_interfaces.rb +20 -0
- data/lib/facter/facts/freebsd/network_interfaces.rb +20 -0
- data/lib/facter/facts/freebsd/networking/dhcp.rb +17 -0
- data/lib/facter/facts/freebsd/networking/domain.rb +18 -0
- data/lib/facter/facts/freebsd/networking/fqdn.rb +18 -0
- data/lib/facter/facts/freebsd/networking/hostname.rb +18 -0
- data/lib/facter/facts/freebsd/networking/interfaces.rb +17 -0
- data/lib/facter/facts/freebsd/networking/ip.rb +18 -0
- data/lib/facter/facts/freebsd/networking/ip6.rb +18 -0
- data/lib/facter/facts/freebsd/networking/mac.rb +18 -0
- data/lib/facter/facts/freebsd/networking/mtu.rb +17 -0
- data/lib/facter/facts/freebsd/networking/netmask.rb +18 -0
- data/lib/facter/facts/freebsd/networking/netmask6.rb +18 -0
- data/lib/facter/facts/freebsd/networking/network.rb +18 -0
- data/lib/facter/facts/freebsd/networking/network6.rb +18 -0
- data/lib/facter/facts/freebsd/networking/primary.rb +17 -0
- data/lib/facter/facts/freebsd/networking/scope6.rb +17 -0
- data/lib/facter/facts/freebsd/os/architecture.rb +18 -0
- data/lib/facter/facts/freebsd/os/hardware.rb +18 -0
- data/lib/facter/facts/freebsd/os/name.rb +18 -0
- data/lib/facter/facts/{bsd/bsd_example_fact.rb → freebsd/path.rb} +5 -4
- data/lib/facter/facts/freebsd/processors/isa.rb +17 -0
- data/lib/facter/facts/freebsd/puppet_version.rb +15 -0
- data/lib/facter/facts/freebsd/ruby/platform.rb +18 -0
- data/lib/facter/facts/freebsd/ruby/sitedir.rb +18 -0
- data/lib/facter/facts/freebsd/ruby/version.rb +18 -0
- data/lib/facter/facts/freebsd/ssh.rb +26 -0
- data/lib/facter/facts/freebsd/system_uptime/days.rb +18 -0
- data/lib/facter/facts/freebsd/system_uptime/hours.rb +18 -0
- data/lib/facter/facts/freebsd/system_uptime/seconds.rb +18 -0
- data/lib/facter/facts/freebsd/system_uptime/uptime.rb +18 -0
- data/lib/facter/facts/freebsd/timezone.rb +15 -0
- data/lib/facter/facts/freebsd/zfs_featurenumbers.rb +14 -0
- data/lib/facter/facts/freebsd/zfs_version.rb +14 -0
- data/lib/facter/facts/freebsd/zpool_featureflags.rb +14 -0
- data/lib/facter/facts/freebsd/zpool_featurenumbers.rb +14 -0
- data/lib/facter/facts/freebsd/zpool_version.rb +14 -0
- data/lib/facter/facts/linux/mountpoints.rb +1 -1
- data/lib/facter/facts/linux/partitions.rb +1 -1
- data/lib/facter/facts/linux/ssh.rb +19 -9
- data/lib/facter/facts/linux/system_uptime/days.rb +7 -1
- data/lib/facter/facts/linux/system_uptime/hours.rb +7 -1
- data/lib/facter/facts/linux/system_uptime/seconds.rb +7 -1
- data/lib/facter/facts/linux/system_uptime/uptime.rb +7 -1
- data/lib/facter/facts/macosx/dhcp_servers.rb +2 -2
- data/lib/facter/facts/macosx/interfaces.rb +1 -1
- data/lib/facter/facts/macosx/ipaddress6_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/ipaddress_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/macaddress_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/mtu_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/netmask6_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/netmask_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/network6_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/network_interfaces.rb +1 -1
- data/lib/facter/facts/macosx/networking/dhcp.rb +1 -1
- data/lib/facter/facts/macosx/networking/interfaces.rb +1 -1
- data/lib/facter/facts/macosx/networking/ip.rb +1 -1
- data/lib/facter/facts/macosx/networking/ip6.rb +1 -1
- data/lib/facter/facts/macosx/networking/mac.rb +1 -1
- data/lib/facter/facts/macosx/networking/mtu.rb +1 -1
- data/lib/facter/facts/macosx/networking/netmask.rb +1 -1
- data/lib/facter/facts/macosx/networking/netmask6.rb +1 -1
- data/lib/facter/facts/macosx/networking/network.rb +1 -1
- data/lib/facter/facts/macosx/networking/network6.rb +1 -1
- data/lib/facter/facts/macosx/networking/primary.rb +1 -1
- data/lib/facter/facts/macosx/networking/scope6.rb +1 -1
- data/lib/facter/facts/macosx/scope6_interfaces.rb +2 -2
- data/lib/facter/facts/macosx/ssh.rb +19 -11
- data/lib/facter/facts/solaris/current_zone.rb +16 -0
- data/lib/facter/facts/solaris/disks.rb +14 -0
- data/lib/facter/facts/solaris/dmi/bios/release_date.rb +24 -0
- data/lib/facter/facts/solaris/dmi/bios/vendor.rb +24 -0
- data/lib/facter/facts/solaris/dmi/bios/version.rb +24 -0
- data/lib/facter/facts/solaris/dmi/chassis/asset_tag.rb +24 -0
- data/lib/facter/facts/solaris/dmi/chassis/type.rb +24 -0
- data/lib/facter/facts/solaris/dmi/manufacturer.rb +25 -0
- data/lib/facter/facts/solaris/dmi/product/name.rb +27 -0
- data/lib/facter/facts/solaris/dmi/product/serial_number.rb +27 -0
- data/lib/facter/facts/solaris/dmi/product/uuid.rb +24 -0
- data/lib/facter/facts/solaris/mountpoints.rb +1 -1
- data/lib/facter/facts/solaris/os/release.rb +3 -3
- data/lib/facter/facts/solaris/ssh.rb +19 -9
- data/lib/facter/facts/solaris/zfs_featurenumbers.rb +1 -1
- data/lib/facter/facts/solaris/zfs_version.rb +1 -1
- data/lib/facter/facts/solaris/zones.rb +60 -0
- data/lib/facter/facts/solaris/zpool_featureflags.rb +1 -1
- data/lib/facter/facts/solaris/zpool_featurenumbers.rb +1 -1
- data/lib/facter/facts/solaris/zpool_version.rb +1 -1
- data/lib/facter/facts/windows/dhcp_servers.rb +2 -2
- data/lib/facter/facts/windows/interfaces.rb +1 -1
- data/lib/facter/facts/windows/ipaddress6_interfaces.rb +1 -1
- data/lib/facter/facts/windows/ipaddress_interfaces.rb +1 -1
- data/lib/facter/facts/windows/macaddress_interfaces.rb +1 -1
- data/lib/facter/facts/windows/mtu_interfaces.rb +1 -1
- data/lib/facter/facts/windows/netmask6_interfaces.rb +1 -1
- data/lib/facter/facts/windows/netmask_interfaces.rb +1 -1
- data/lib/facter/facts/windows/network6_interfaces.rb +1 -1
- data/lib/facter/facts/windows/network_interfaces.rb +1 -1
- data/lib/facter/facts/windows/networking/dhcp.rb +1 -1
- data/lib/facter/facts/windows/networking/domain.rb +1 -1
- data/lib/facter/facts/windows/networking/fqdn.rb +1 -1
- data/lib/facter/facts/windows/networking/interfaces.rb +1 -1
- data/lib/facter/facts/windows/networking/ip.rb +1 -1
- data/lib/facter/facts/windows/networking/ip6.rb +1 -1
- data/lib/facter/facts/windows/networking/mac.rb +1 -1
- data/lib/facter/facts/windows/networking/mtu.rb +1 -1
- data/lib/facter/facts/windows/networking/netmask.rb +1 -1
- data/lib/facter/facts/windows/networking/netmask6.rb +1 -1
- data/lib/facter/facts/windows/networking/network.rb +1 -1
- data/lib/facter/facts/windows/networking/network6.rb +1 -1
- data/lib/facter/facts/windows/networking/primary.rb +1 -1
- data/lib/facter/facts/windows/networking/scope6.rb +1 -1
- data/lib/facter/facts/windows/scope6_interfaces.rb +1 -1
- data/lib/facter/framework/cli/cli.rb +16 -4
- data/lib/facter/framework/config/fact_groups.rb +13 -0
- data/lib/facter/os_hierarchy.json +3 -6
- data/lib/facter/resolvers/base_resolver.rb +1 -1
- data/lib/facter/resolvers/ec2.rb +2 -2
- data/lib/facter/resolvers/filesystems_resolver.rb +1 -1
- data/lib/facter/resolvers/linux/docker_uptime.rb +45 -0
- data/lib/facter/resolvers/linux/load_averages.rb +0 -1
- data/lib/facter/resolvers/load_averages.rb +2 -0
- data/lib/facter/resolvers/mountpoints_resolver.rb +42 -44
- data/lib/facter/resolvers/networking_resolver.rb +106 -0
- data/lib/facter/resolvers/solaris/disks.rb +51 -0
- data/lib/facter/resolvers/solaris/dmi.rb +57 -0
- data/lib/facter/resolvers/solaris/dmi_sparc.rb +47 -0
- data/lib/facter/resolvers/solaris/{filesystems_resolver.rb → filesystems.rb} +0 -0
- data/lib/facter/resolvers/solaris/{ipaddress_resolver.rb → ipaddress.rb} +0 -0
- data/lib/facter/resolvers/solaris/{networking_resolver.rb → networking.rb} +0 -0
- data/lib/facter/resolvers/solaris/os_release.rb +44 -0
- data/lib/facter/resolvers/solaris/zone.rb +51 -0
- data/lib/facter/resolvers/solaris/zone_name.rb +31 -0
- data/lib/facter/resolvers/uptime_resolver.rb +1 -27
- data/lib/facter/resolvers/utils/uptime_helper.rb +32 -0
- data/lib/facter/resolvers/windows/networking_resolver.rb +100 -98
- data/lib/facter/resolvers/zfs.rb +32 -0
- data/lib/facter/resolvers/zpool.rb +34 -0
- data/lib/facter/version.rb +1 -1
- metadata +77 -16
- data/lib/facter/facts/freebsd/solaris_zones/current.rb +0 -15
- data/lib/facter/facts/freebsd/solaris_zones/zone.rb +0 -15
- data/lib/facter/facts/solaris/solaris_zones/zone.rb +0 -62
- data/lib/facter/resolvers/macosx/networking_resolver.rb +0 -108
- data/lib/facter/resolvers/solaris/solaris_os_release_resolver.rb +0 -42
- data/lib/facter/resolvers/solaris/solaris_zone_name.rb +0 -28
- data/lib/facter/resolvers/solaris/zfs_resolver.rb +0 -34
- data/lib/facter/resolvers/solaris/zone_resolver.rb +0 -48
- data/lib/facter/resolvers/solaris/zpool_resolver.rb +0 -36
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
class CurrentZone
|
6
|
+
FACT_NAME = 'solaris_zones.current'
|
7
|
+
ALIASES = 'zonename'
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
fact_value = Facter::Resolvers::Solaris::ZoneName.resolve(:current_zone_name)
|
11
|
+
|
12
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
class Disks
|
6
|
+
FACT_NAME = 'disks'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
fact_value = Facter::Resolvers::Solaris::Disks.resolve(:disks)
|
10
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Bios
|
7
|
+
class ReleaseDate
|
8
|
+
FACT_NAME = 'dmi.bios.release_date'
|
9
|
+
ALIASES = 'bios_release_date'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = nil
|
13
|
+
fact_value = Facter::Resolvers::Solaris::Dmi.resolve(:bios_release_date) if isa == 'i386'
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
|
17
|
+
def isa
|
18
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Bios
|
7
|
+
class Vendor
|
8
|
+
FACT_NAME = 'dmi.bios.vendor'
|
9
|
+
ALIASES = 'bios_vendor'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = nil
|
13
|
+
fact_value = Facter::Resolvers::Solaris::Dmi.resolve(:bios_vendor) if isa == 'i386'
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
|
17
|
+
def isa
|
18
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Bios
|
7
|
+
class Version
|
8
|
+
FACT_NAME = 'dmi.bios.version'
|
9
|
+
ALIASES = 'bios_version'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = nil
|
13
|
+
fact_value = Facter::Resolvers::Solaris::Dmi.resolve(:bios_version) if isa == 'i386'
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
|
17
|
+
def isa
|
18
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Chassis
|
7
|
+
class AssetTag
|
8
|
+
FACT_NAME = 'dmi.chassis.asset_tag'
|
9
|
+
ALIASES = 'chassisassettag'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = nil
|
13
|
+
fact_value = Facter::Resolvers::Solaris::Dmi.resolve(:chassis_asset_tag) if isa == 'i386'
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
|
17
|
+
def isa
|
18
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Chassis
|
7
|
+
class Type
|
8
|
+
FACT_NAME = 'dmi.chassis.type'
|
9
|
+
ALIASES = 'chassistype'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = nil
|
13
|
+
fact_value = Facter::Resolvers::Solaris::Dmi.resolve(:chassis_type) if isa == 'i386'
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
|
17
|
+
def isa
|
18
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
class Manufacturer
|
7
|
+
FACT_NAME = 'dmi.manufacturer'
|
8
|
+
ALIASES = 'manufacturer'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = if isa == 'i386'
|
12
|
+
Facter::Resolvers::Solaris::Dmi.resolve(:manufacturer)
|
13
|
+
elsif isa == 'sparc'
|
14
|
+
Facter::Resolvers::Solaris::DmiSparc.resolve(:manufacturer)
|
15
|
+
end
|
16
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
17
|
+
end
|
18
|
+
|
19
|
+
def isa
|
20
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Product
|
7
|
+
class Name
|
8
|
+
FACT_NAME = 'dmi.product.name'
|
9
|
+
ALIASES = 'productname'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = if isa == 'i386'
|
13
|
+
Facter::Resolvers::Solaris::Dmi.resolve(:product_name)
|
14
|
+
elsif isa == 'sparc'
|
15
|
+
Facter::Resolvers::Solaris::DmiSparc.resolve(:product_name)
|
16
|
+
end
|
17
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
18
|
+
end
|
19
|
+
|
20
|
+
def isa
|
21
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Product
|
7
|
+
class SerialNumber
|
8
|
+
FACT_NAME = 'dmi.product.serial_number'
|
9
|
+
ALIASES = 'serialnumber'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = if isa == 'i386'
|
13
|
+
Facter::Resolvers::Solaris::Dmi.resolve(:serial_number)
|
14
|
+
elsif isa == 'sparc'
|
15
|
+
Facter::Resolvers::Solaris::DmiSparc.resolve(:serial_number)
|
16
|
+
end
|
17
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
18
|
+
end
|
19
|
+
|
20
|
+
def isa
|
21
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
module Dmi
|
6
|
+
module Product
|
7
|
+
class Uuid
|
8
|
+
FACT_NAME = 'dmi.product.uuid'
|
9
|
+
ALIASES = 'uuid'
|
10
|
+
|
11
|
+
def call_the_resolver
|
12
|
+
fact_value = nil
|
13
|
+
fact_value = Facter::Resolvers::Solaris::Dmi.resolve(:product_uuid) if isa == 'i386'
|
14
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
|
17
|
+
def isa
|
18
|
+
Facter::Resolvers::Uname.resolve(:processor)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -6,7 +6,7 @@ module Facts
|
|
6
6
|
FACT_NAME = 'mountpoints'
|
7
7
|
|
8
8
|
def call_the_resolver
|
9
|
-
mountpoints = Facter::Resolvers::
|
9
|
+
mountpoints = Facter::Resolvers::Mountpoints.resolve(FACT_NAME.to_sym)
|
10
10
|
return Facter::ResolvedFact.new(FACT_NAME, nil) unless mountpoints
|
11
11
|
|
12
12
|
fact = {}
|
@@ -8,9 +8,9 @@ module Facts
|
|
8
8
|
ALIASES = %w[operatingsystemmajrelease operatingsystemrelease].freeze
|
9
9
|
|
10
10
|
def call_the_resolver
|
11
|
-
full_value = Facter::Resolvers::
|
12
|
-
major_value = Facter::Resolvers::
|
13
|
-
minor_value = Facter::Resolvers::
|
11
|
+
full_value = Facter::Resolvers::Solaris::OsRelease.resolve(:full)
|
12
|
+
major_value = Facter::Resolvers::Solaris::OsRelease.resolve(:major)
|
13
|
+
minor_value = Facter::Resolvers::Solaris::OsRelease.resolve(:minor)
|
14
14
|
|
15
15
|
[Facter::ResolvedFact.new(FACT_NAME, full: full_value, major: major_value, minor: minor_value),
|
16
16
|
Facter::ResolvedFact.new(ALIASES.first, major_value, :legacy),
|
@@ -6,20 +6,30 @@ module Facts
|
|
6
6
|
FACT_NAME = 'ssh'
|
7
7
|
|
8
8
|
def call_the_resolver
|
9
|
-
|
10
|
-
ssh_facts = {}
|
11
|
-
result.each { |ssh| ssh_facts.merge!(create_ssh_fact(ssh)) }
|
12
|
-
Facter::ResolvedFact.new(FACT_NAME, ssh_facts)
|
9
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
13
10
|
end
|
14
11
|
|
15
12
|
private
|
16
13
|
|
14
|
+
def fact_value
|
15
|
+
resolver_data.map { |el| create_ssh_fact(el) }.inject(:merge)
|
16
|
+
end
|
17
|
+
|
18
|
+
def resolver_data
|
19
|
+
Facter::Resolvers::SshResolver.resolve(:ssh)
|
20
|
+
end
|
21
|
+
|
17
22
|
def create_ssh_fact(ssh)
|
18
|
-
{ ssh
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
+
return {} unless ssh
|
24
|
+
|
25
|
+
{ ssh.name.to_sym => {
|
26
|
+
fingerprints: {
|
27
|
+
sha1: ssh.fingerprint.sha1,
|
28
|
+
sha256: ssh.fingerprint.sha256
|
29
|
+
},
|
30
|
+
key: ssh.key,
|
31
|
+
type: ssh.type
|
32
|
+
} }
|
23
33
|
end
|
24
34
|
end
|
25
35
|
end
|
@@ -6,7 +6,7 @@ module Facts
|
|
6
6
|
FACT_NAME = 'zfs_featurenumbers'
|
7
7
|
|
8
8
|
def call_the_resolver
|
9
|
-
fact_value = Facter::Resolvers::
|
9
|
+
fact_value = Facter::Resolvers::ZFS.resolve(:zfs_featurenumbers)
|
10
10
|
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
11
|
end
|
12
12
|
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Solaris
|
5
|
+
class Zones
|
6
|
+
FACT_NAME = 'solaris_zones.zones'
|
7
|
+
ALIASES = %w[
|
8
|
+
zone_.*_brand
|
9
|
+
zone_.*_iptype
|
10
|
+
zone_.*_name
|
11
|
+
zone_.*_uuid
|
12
|
+
zone_.*_id
|
13
|
+
zone_.*_path
|
14
|
+
zone_.*_status
|
15
|
+
zones
|
16
|
+
].freeze
|
17
|
+
|
18
|
+
def call_the_resolver
|
19
|
+
resolved_facts = []
|
20
|
+
zones = {}
|
21
|
+
|
22
|
+
results = Facter::Resolvers::Solaris::Zone.resolve(:zone)
|
23
|
+
return Facter::ResolvedFact.new(FACT_NAME, nil) unless results
|
24
|
+
|
25
|
+
results&.each do |result|
|
26
|
+
zones.merge!(parse_result(result))
|
27
|
+
resolved_facts << create_legacy_zone_facts(result)
|
28
|
+
end
|
29
|
+
|
30
|
+
resolved_facts << Facter::ResolvedFact.new('solaris_zones.zones', zones)
|
31
|
+
resolved_facts << Facter::ResolvedFact.new('zones', results.count, :legacy)
|
32
|
+
|
33
|
+
resolved_facts.flatten
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def parse_result(result)
|
39
|
+
{
|
40
|
+
result[:name].to_sym => {
|
41
|
+
brand: result[:brand],
|
42
|
+
id: result[:id],
|
43
|
+
ip_type: result[:iptype],
|
44
|
+
path: result[:path],
|
45
|
+
status: result[:status]
|
46
|
+
}
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
def create_legacy_zone_facts(zone)
|
51
|
+
legacy_facts = []
|
52
|
+
%w[brand iptype name uuid id path status].each do |key|
|
53
|
+
legacy_facts << Facter::ResolvedFact.new("zone_#{zone[:name]}_#{key}", zone[key.to_sym], :legacy)
|
54
|
+
end
|
55
|
+
|
56
|
+
legacy_facts
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -6,7 +6,7 @@ module Facts
|
|
6
6
|
FACT_NAME = 'zpool_featureflags'
|
7
7
|
|
8
8
|
def call_the_resolver
|
9
|
-
fact_value = Facter::Resolvers::
|
9
|
+
fact_value = Facter::Resolvers::Zpool.resolve(:zpool_featureflags)
|
10
10
|
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
11
|
end
|
12
12
|
end
|
@@ -6,7 +6,7 @@ module Facts
|
|
6
6
|
FACT_NAME = 'zpool_featurenumbers'
|
7
7
|
|
8
8
|
def call_the_resolver
|
9
|
-
fact_value = Facter::Resolvers::
|
9
|
+
fact_value = Facter::Resolvers::Zpool.resolve(:zpool_featurenumbers)
|
10
10
|
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
11
|
end
|
12
12
|
end
|
@@ -6,7 +6,7 @@ module Facts
|
|
6
6
|
FACT_NAME = 'zpool_version'
|
7
7
|
|
8
8
|
def call_the_resolver
|
9
|
-
fact_value = Facter::Resolvers::
|
9
|
+
fact_value = Facter::Resolvers::Zpool.resolve(:zpool_version)
|
10
10
|
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
11
|
end
|
12
12
|
end
|
@@ -14,10 +14,10 @@ module Facts
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def construct_addresses_hash
|
17
|
-
interfaces = Facter::Resolvers::Networking.resolve(:interfaces)
|
17
|
+
interfaces = Facter::Resolvers::Windows::Networking.resolve(:interfaces)
|
18
18
|
return unless interfaces
|
19
19
|
|
20
|
-
servers = { system: Facter::Resolvers::Networking.resolve(:dhcp) }
|
20
|
+
servers = { system: Facter::Resolvers::Windows::Networking.resolve(:dhcp) }
|
21
21
|
interfaces&.each { |interface_name, info| servers[interface_name] = info[:dhcp] if info[:dhcp] }
|
22
22
|
servers
|
23
23
|
end
|