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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 310bcaf0123dcbfdc035568dd69e5701204fdd47286c4f1a57cc2cec1bb310f2
|
4
|
+
data.tar.gz: 1165a5771b7da00ba62b0869b3c951a475466cf99d959090e7ff168565076134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3a8f6a079db9d1ab380205953ea1f325ab4274de480ba49ef4e1d162e6ff3058ee78ac89ef845fb19949806d53d857cc0f8f9ff651d346ff71179a5fd6b682d
|
7
|
+
data.tar.gz: 0270a90dd9010adc24a61cb00c31b4ebade6847a2d8697d56bef09ea8e66ce6417e7298885bf3c8cd36ccc90917c5ba7e25c0efe81e795b8fd5df90d43c5d308
|
data/lib/facter/facts/aix/ssh.rb
CHANGED
@@ -12,7 +12,7 @@ module Facts
|
|
12
12
|
private
|
13
13
|
|
14
14
|
def fact_value
|
15
|
-
resolver_data.map
|
15
|
+
resolver_data.map { |el| create_ssh_fact(el) }.inject(:merge)
|
16
16
|
end
|
17
17
|
|
18
18
|
def resolver_data
|
@@ -20,6 +20,8 @@ module Facts
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def create_ssh_fact(ssh)
|
23
|
+
return {} unless ssh
|
24
|
+
|
23
25
|
{ ssh.name.to_sym => {
|
24
26
|
fingerprints: {
|
25
27
|
sha1: ssh.fingerprint.sha1,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
module Augeas
|
6
|
+
class Version
|
7
|
+
FACT_NAME = 'augeas.version'
|
8
|
+
ALIASES = 'augeasversion'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Augeas.resolve(:augeas_version)
|
12
|
+
|
13
|
+
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
|
14
|
+
Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class Facterversion
|
6
|
+
FACT_NAME = 'facterversion'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
fact_value = Facter::Resolvers::Facterversion.resolve(:facterversion)
|
10
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
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
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Facts
|
4
|
-
module
|
5
|
-
module
|
6
|
-
class
|
7
|
-
FACT_NAME = '
|
8
|
-
ALIASES = '
|
4
|
+
module Freebsd
|
5
|
+
module Identity
|
6
|
+
class Group
|
7
|
+
FACT_NAME = 'identity.group'
|
8
|
+
ALIASES = 'gid'
|
9
9
|
|
10
10
|
def call_the_resolver
|
11
|
-
fact_value = Facter::Resolvers::
|
11
|
+
fact_value = Facter::Resolvers::PosxIdentity.resolve(:group)
|
12
12
|
|
13
13
|
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
|
14
14
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
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 Freebsd
|
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,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
module Identity
|
6
|
+
class User
|
7
|
+
FACT_NAME = 'identity.user'
|
8
|
+
ALIASES = 'id'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::PosxIdentity.resolve(:user)
|
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,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class Kernel
|
6
|
+
FACT_NAME = 'kernel'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
fact_value = Facter::Resolvers::Uname.resolve(:kernelname)
|
10
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class Kernelrelease
|
6
|
+
FACT_NAME = 'kernelrelease'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
fact_value = Facter::Resolvers::Uname.resolve(:kernelrelease)
|
10
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class Mountpoints
|
6
|
+
FACT_NAME = 'mountpoints'
|
7
|
+
|
8
|
+
def call_the_resolver
|
9
|
+
mountpoints = Facter::Resolvers::Mountpoints.resolve(FACT_NAME.to_sym)
|
10
|
+
return Facter::ResolvedFact.new(FACT_NAME, nil) unless mountpoints
|
11
|
+
|
12
|
+
fact = {}
|
13
|
+
mountpoints.each do |mnt|
|
14
|
+
fact[mnt[:path].to_sym] = mnt.reject { |k| k == :path }
|
15
|
+
end
|
16
|
+
|
17
|
+
Facter::ResolvedFact.new(FACT_NAME, fact)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class Netmask6Interfaces
|
6
|
+
FACT_NAME = 'netmask6_.*'
|
7
|
+
TYPE = :legacy
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
arr = []
|
11
|
+
interfaces = Facter::Resolvers::Networking.resolve(:interfaces)
|
12
|
+
interfaces&.each do |interface_name, info|
|
13
|
+
arr << Facter::ResolvedFact.new("netmask6_#{interface_name}", info[:netmask6], :legacy) if info[:netmask6]
|
14
|
+
end
|
15
|
+
|
16
|
+
arr
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class NetmaskInterfaces
|
6
|
+
FACT_NAME = 'netmask_.*'
|
7
|
+
TYPE = :legacy
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
arr = []
|
11
|
+
interfaces = Facter::Resolvers::Networking.resolve(:interfaces)
|
12
|
+
interfaces&.each do |interface_name, info|
|
13
|
+
arr << Facter::ResolvedFact.new("netmask_#{interface_name}", info[:netmask], :legacy) if info[:netmask]
|
14
|
+
end
|
15
|
+
|
16
|
+
arr
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class Network6Interfaces
|
6
|
+
FACT_NAME = 'network6_.*'
|
7
|
+
TYPE = :legacy
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
arr = []
|
11
|
+
interfaces = Facter::Resolvers::Networking.resolve(:interfaces)
|
12
|
+
interfaces&.each do |interface_name, info|
|
13
|
+
arr << Facter::ResolvedFact.new("network6_#{interface_name}", info[:network6], :legacy) if info[:network6]
|
14
|
+
end
|
15
|
+
|
16
|
+
arr
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
class NetworkInterfaces
|
6
|
+
FACT_NAME = 'network_.*'
|
7
|
+
TYPE = :legacy
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
arr = []
|
11
|
+
interfaces = Facter::Resolvers::Networking.resolve(:interfaces)
|
12
|
+
interfaces&.each do |interface_name, info|
|
13
|
+
arr << Facter::ResolvedFact.new("network_#{interface_name}", info[:network], :legacy) if info[:network]
|
14
|
+
end
|
15
|
+
|
16
|
+
arr
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
module Networking
|
6
|
+
class Dhcp
|
7
|
+
FACT_NAME = 'networking.dhcp'
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
fact_value = Facter::Resolvers::Networking.resolve(:dhcp)
|
11
|
+
|
12
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
module Networking
|
6
|
+
class Domain
|
7
|
+
FACT_NAME = 'networking.domain'
|
8
|
+
ALIASES = 'domain'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Hostname.resolve(:domain)
|
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 Freebsd
|
5
|
+
module Networking
|
6
|
+
class Fqdn
|
7
|
+
FACT_NAME = 'networking.fqdn'
|
8
|
+
ALIASES = 'fqdn'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Hostname.resolve(:fqdn)
|
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 Freebsd
|
5
|
+
module Networking
|
6
|
+
class Hostname
|
7
|
+
FACT_NAME = 'networking.hostname'
|
8
|
+
ALIASES = 'hostname'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Hostname.resolve(:hostname)
|
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,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
module Networking
|
6
|
+
class Interfaces
|
7
|
+
FACT_NAME = 'networking.interfaces'
|
8
|
+
|
9
|
+
def call_the_resolver
|
10
|
+
fact_value = Facter::Resolvers::Networking.resolve(:interfaces)
|
11
|
+
|
12
|
+
Facter::ResolvedFact.new(FACT_NAME, fact_value)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Facts
|
4
|
+
module Freebsd
|
5
|
+
module Networking
|
6
|
+
class Ip
|
7
|
+
FACT_NAME = 'networking.ip'
|
8
|
+
ALIASES = 'ipaddress'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Networking.resolve(:ip)
|
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 Freebsd
|
5
|
+
module Networking
|
6
|
+
class Ip6
|
7
|
+
FACT_NAME = 'networking.ip6'
|
8
|
+
ALIASES = 'ipaddress6'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Networking.resolve(:ip6)
|
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 Freebsd
|
5
|
+
module Networking
|
6
|
+
class Mac
|
7
|
+
FACT_NAME = 'networking.mac'
|
8
|
+
ALIASES = 'macaddress'
|
9
|
+
|
10
|
+
def call_the_resolver
|
11
|
+
fact_value = Facter::Resolvers::Networking.resolve(:mac)
|
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
|