facterdb 1.20.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +17 -0
- data/.github/workflows/release.yml +3 -3
- data/.github/workflows/test.yml +29 -5
- data/.rubocop.yml +5 -0
- data/.rubocop_todo.yml +239 -0
- data/CHANGELOG.md +27 -1
- data/Gemfile +1 -5
- data/README.md +124 -119
- data/Rakefile +56 -51
- data/facterdb.gemspec +7 -7
- data/facts/3.14/rocky-9-x86_64.facts +597 -0
- data/facts/3.14/ubuntu-22.10-x86_64.facts +631 -0
- data/facts/4.0/rocky-9-x86_64.facts +617 -0
- data/facts/4.1/centos-7-x86_64.facts +582 -0
- data/facts/4.1/debian-10-x86_64.facts +519 -0
- data/facts/4.1/rocky-9-x86_64.facts +619 -0
- data/facts/4.2/debian-12-i386.facts +593 -0
- data/facts/4.2/debian-12-x86_64.facts +593 -0
- data/facts/4.2/fedora-37-x86_64.facts +512 -0
- data/facts/4.2/fedora-38-x86_64.facts +656 -0
- data/facts/4.2/rocky-9-x86_64.facts +626 -0
- data/facts/4.2/sles-12-x86_64.facts +483 -0
- data/facts/4.2/ubuntu-22.10-x86_64.facts +654 -0
- data/facts/4.3/almalinux-8-x86_64.facts +551 -0
- data/facts/4.3/almalinux-9-x86_64.facts +525 -0
- data/facts/4.3/centos-7-x86_64.facts +592 -0
- data/facts/4.3/debian-10-x86_64.facts +526 -0
- data/facts/4.3/debian-11-x86_64.facts +521 -0
- data/facts/4.3/debian-12-i386.facts +593 -0
- data/facts/4.3/debian-12-x86_64.facts +593 -0
- data/facts/4.3/fedora-36-x86_64.facts +507 -0
- data/facts/4.3/fedora-37-x86_64.facts +512 -0
- data/facts/4.3/fedora-38-x86_64.facts +656 -0
- data/facts/4.3/opensuse-15-x86_64.facts +533 -0
- data/facts/4.3/redhat-8-x86_64.facts +526 -0
- data/facts/4.3/rocky-8-x86_64.facts +545 -0
- data/facts/4.3/rocky-9-x86_64.facts +626 -0
- data/facts/4.3/sles-12-x86_64.facts +908 -0
- data/facts/4.3/ubuntu-18.04-x86_64.facts +557 -0
- data/facts/4.3/ubuntu-20.04-x86_64.facts +647 -0
- data/facts/4.3/ubuntu-22.04-x86_64.facts +655 -0
- data/facts/4.3/windows-10-x86_64.facts +182 -0
- data/facts/4.3/windows-11-x86_64.facts +182 -0
- data/facts/4.3/windows-2012 r2-x86_64.facts +179 -0
- data/facts/4.3/windows-2012-x86_64.facts +179 -0
- data/facts/4.3/windows-2016-core-x86_64.facts +181 -0
- data/facts/4.3/windows-2016-x86_64.facts +181 -0
- data/facts/4.3/windows-2019-core-x86_64.facts +181 -0
- data/facts/4.3/windows-2019-x86_64.facts +181 -0
- data/facts/4.3/windows-2022-core-x86_64.facts +183 -0
- data/facts/4.3/windows-2022-x86_64.facts +183 -0
- data/facts/4.4/almalinux-8-x86_64.facts +551 -0
- data/facts/4.4/almalinux-9-x86_64.facts +525 -0
- data/facts/4.4/centos-7-x86_64.facts +592 -0
- data/facts/4.4/debian-10-x86_64.facts +526 -0
- data/facts/4.4/debian-11-x86_64.facts +521 -0
- data/facts/4.4/debian-12-i386.facts +593 -0
- data/facts/4.4/debian-12-x86_64.facts +593 -0
- data/facts/4.4/fedora-36-x86_64.facts +507 -0
- data/facts/4.4/fedora-37-x86_64.facts +512 -0
- data/facts/4.4/fedora-38-x86_64.facts +656 -0
- data/facts/4.4/opensuse-15-x86_64.facts +514 -0
- data/facts/4.4/redhat-8-x86_64.facts +526 -0
- data/facts/4.4/rocky-8-x86_64.facts +545 -0
- data/facts/4.4/rocky-9-x86_64.facts +626 -0
- data/facts/4.4/sles-12-x86_64.facts +908 -0
- data/facts/4.4/ubuntu-18.04-x86_64.facts +557 -0
- data/facts/4.4/ubuntu-20.04-x86_64.facts +647 -0
- data/facts/4.4/ubuntu-22.04-x86_64.facts +655 -0
- data/facts/4.4/windows-10-x86_64.facts +182 -0
- data/facts/4.4/windows-11-x86_64.facts +186 -0
- data/facts/4.4/windows-2012 r2-x86_64.facts +179 -0
- data/facts/4.4/windows-2012-x86_64.facts +179 -0
- data/facts/4.4/windows-2016-core-x86_64.facts +181 -0
- data/facts/4.4/windows-2016-x86_64.facts +181 -0
- data/facts/4.4/windows-2019-core-x86_64.facts +181 -0
- data/facts/4.4/windows-2019-x86_64.facts +181 -0
- data/facts/4.4/windows-2022-core-x86_64.facts +183 -0
- data/facts/4.4/windows-2022-x86_64.facts +183 -0
- data/facts/Gemfile +3 -7
- data/facts/Vagrantfile +315 -275
- data/facts/get_facts.sh +68 -10
- data/lib/facterdb/bin.rb +1 -1
- data/lib/facterdb/version.rb +1 -1
- data/lib/facterdb.rb +40 -32
- data/rakelib/rhel_alts.rake +8 -14
- data/spec/facterdb_spec.rb +37 -37
- data/spec/facts_spec.rb +13 -7
- metadata +92 -6
data/spec/facts_spec.rb
CHANGED
@@ -14,7 +14,7 @@ end
|
|
14
14
|
|
15
15
|
RSpec::Matchers.define :be_valid_json do
|
16
16
|
match do |actual|
|
17
|
-
content = File.
|
17
|
+
content = File.binread(actual)
|
18
18
|
valid = false
|
19
19
|
begin
|
20
20
|
obj = JSON.parse(content)
|
@@ -41,17 +41,17 @@ RSpec::Matchers.define :have_facter_version do |expected_facter_version, filepat
|
|
41
41
|
end
|
42
42
|
|
43
43
|
describe 'Default Facts' do
|
44
|
-
before
|
44
|
+
before do
|
45
45
|
ENV['FACTERDB_SKIP_DEFAULTDB'] = nil
|
46
46
|
FacterDB.instance_variable_set(:@database, nil)
|
47
47
|
end
|
48
48
|
|
49
49
|
describe 'fact files' do
|
50
|
-
it '
|
50
|
+
it 'does not contain duplicate fact sets' do
|
51
51
|
# Gather all of the default files and hash the content
|
52
52
|
file_hashes = {}
|
53
53
|
FacterDB.default_fact_files.each do |filepath|
|
54
|
-
file_hash = Digest::SHA256.hexdigest(
|
54
|
+
file_hash = Digest::SHA256.hexdigest(File.binread(filepath))
|
55
55
|
file_hashes[file_hash] ||= []
|
56
56
|
file_hashes[file_hash] << filepath
|
57
57
|
end
|
@@ -67,7 +67,7 @@ describe 'Default Facts' do
|
|
67
67
|
relative_path = Pathname.new(filepath).relative_path_from(project_dir).to_s
|
68
68
|
describe relative_path do
|
69
69
|
subject(:content) do
|
70
|
-
JSON.parse(File.
|
70
|
+
JSON.parse(File.binread(filepath))
|
71
71
|
end
|
72
72
|
|
73
73
|
it 'contains a valid JSON document' do
|
@@ -88,9 +88,11 @@ describe 'Default Facts' do
|
|
88
88
|
expect(content['networking']['fqdn']).to eq('foo.example.com')
|
89
89
|
end
|
90
90
|
end
|
91
|
+
|
91
92
|
it 'contains the legacy ipaddress fact' do
|
92
93
|
expect(content['ipaddress']).to not_be_nil.and not_be_empty
|
93
94
|
end
|
95
|
+
|
94
96
|
it 'contains no facts from puppetlabs/stdlib' do
|
95
97
|
expect(content['root_home']).to be_nil
|
96
98
|
expect(content['service_provider']).to be_nil
|
@@ -100,21 +102,25 @@ describe 'Default Facts' do
|
|
100
102
|
expect(content['pe_version']).to be_nil
|
101
103
|
expect(content['package_provider']).to be_nil
|
102
104
|
end
|
105
|
+
|
103
106
|
it 'contains no facts from puppet/systemd' do
|
104
107
|
expect(content['systemd']).to be_nil
|
105
108
|
expect(content['systemd_version']).to be_nil
|
106
109
|
expect(content['systemd_internal_services']).to be_nil
|
107
110
|
end
|
111
|
+
|
108
112
|
it 'contains a legacy hostname, domain and fqdn fact' do
|
109
113
|
expect(content['hostname']).to eq('foo')
|
110
114
|
expect(content['fqdn']).to eq('foo.example.com')
|
111
115
|
expect(content['domain']).to eq('example.com')
|
112
116
|
end
|
117
|
+
|
113
118
|
it 'contains the legacy osfamily fact' do
|
114
|
-
expect(content['osfamily']).
|
119
|
+
expect(content['osfamily']).not_to be_nil
|
115
120
|
end
|
121
|
+
|
116
122
|
it 'contains the legacy operatingsystem fact' do
|
117
|
-
expect(content['operatingsystem']).
|
123
|
+
expect(content['operatingsystem']).not_to be_nil
|
118
124
|
end
|
119
125
|
end
|
120
126
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facterdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: pry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: voxpupuli-rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.0.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.0.0
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: facter
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,10 +116,13 @@ executables:
|
|
102
116
|
extensions: []
|
103
117
|
extra_rdoc_files: []
|
104
118
|
files:
|
119
|
+
- ".github/dependabot.yml"
|
105
120
|
- ".github/workflows/release.yml"
|
106
121
|
- ".github/workflows/test.yml"
|
107
122
|
- ".gitignore"
|
108
123
|
- ".gitmodules"
|
124
|
+
- ".rubocop.yml"
|
125
|
+
- ".rubocop_todo.yml"
|
109
126
|
- CHANGELOG.md
|
110
127
|
- Gemfile
|
111
128
|
- HISTORY.md
|
@@ -1350,6 +1367,7 @@ files:
|
|
1350
1367
|
- facts/3.14/redhat-7-x86_64.facts
|
1351
1368
|
- facts/3.14/redhat-8-x86_64.facts
|
1352
1369
|
- facts/3.14/rocky-8-x86_64.facts
|
1370
|
+
- facts/3.14/rocky-9-x86_64.facts
|
1353
1371
|
- facts/3.14/scientific-6-x86_64.facts
|
1354
1372
|
- facts/3.14/scientific-7-x86_64.facts
|
1355
1373
|
- facts/3.14/sles-11-x86_64.facts
|
@@ -1364,6 +1382,7 @@ files:
|
|
1364
1382
|
- facts/3.14/ubuntu-21.04-x86_64.facts
|
1365
1383
|
- facts/3.14/ubuntu-21.10-x86_64.facts
|
1366
1384
|
- facts/3.14/ubuntu-22.04-x86_64.facts
|
1385
|
+
- facts/3.14/ubuntu-22.10-x86_64.facts
|
1367
1386
|
- facts/3.14/windows-10-i386.facts
|
1368
1387
|
- facts/3.14/windows-10-x86_64.facts
|
1369
1388
|
- facts/3.14/windows-2012 r2-core-x86_64.facts
|
@@ -1763,6 +1782,7 @@ files:
|
|
1763
1782
|
- facts/4.0/redhat-7-x86_64.facts
|
1764
1783
|
- facts/4.0/redhat-8-x86_64.facts
|
1765
1784
|
- facts/4.0/rocky-8-x86_64.facts
|
1785
|
+
- facts/4.0/rocky-9-x86_64.facts
|
1766
1786
|
- facts/4.0/scientific-7-x86_64.facts
|
1767
1787
|
- facts/4.0/solaris-11-sun4v.facts
|
1768
1788
|
- facts/4.0/ubuntu-16.04-x86_64.facts
|
@@ -1772,6 +1792,8 @@ files:
|
|
1772
1792
|
- facts/4.0/ubuntu-21.10-x86_64.facts
|
1773
1793
|
- facts/4.1/almalinux-8-x86_64.facts
|
1774
1794
|
- facts/4.1/almalinux-9-x86_64.facts
|
1795
|
+
- facts/4.1/centos-7-x86_64.facts
|
1796
|
+
- facts/4.1/debian-10-x86_64.facts
|
1775
1797
|
- facts/4.1/debian-11-x86_64.facts
|
1776
1798
|
- facts/4.1/fedora-32-x86_64.facts
|
1777
1799
|
- facts/4.1/fedora-33-x86_64.facts
|
@@ -1783,6 +1805,7 @@ files:
|
|
1783
1805
|
- facts/4.1/opensuse-15-x86_64.facts
|
1784
1806
|
- facts/4.1/redhat-8-x86_64.facts
|
1785
1807
|
- facts/4.1/rocky-8-x86_64.facts
|
1808
|
+
- facts/4.1/rocky-9-x86_64.facts
|
1786
1809
|
- facts/4.1/ubuntu-16.04-x86_64.facts
|
1787
1810
|
- facts/4.1/ubuntu-18.04-x86_64.facts
|
1788
1811
|
- facts/4.1/ubuntu-20.04-x86_64.facts
|
@@ -1798,12 +1821,16 @@ files:
|
|
1798
1821
|
- facts/4.2/darwin-20-x86_64.facts
|
1799
1822
|
- facts/4.2/debian-10-x86_64.facts
|
1800
1823
|
- facts/4.2/debian-11-x86_64.facts
|
1824
|
+
- facts/4.2/debian-12-i386.facts
|
1825
|
+
- facts/4.2/debian-12-x86_64.facts
|
1801
1826
|
- facts/4.2/debian-9-x86_64.facts
|
1802
1827
|
- facts/4.2/fedora-32-x86_64.facts
|
1803
1828
|
- facts/4.2/fedora-33-x86_64.facts
|
1804
1829
|
- facts/4.2/fedora-34-x86_64.facts
|
1805
1830
|
- facts/4.2/fedora-35-x86_64.facts
|
1806
1831
|
- facts/4.2/fedora-36-x86_64.facts
|
1832
|
+
- facts/4.2/fedora-37-x86_64.facts
|
1833
|
+
- facts/4.2/fedora-38-x86_64.facts
|
1807
1834
|
- facts/4.2/freebsd-11-x86_64.facts
|
1808
1835
|
- facts/4.2/freebsd-12-x86_64.facts
|
1809
1836
|
- facts/4.2/freebsd-13-x86_64.facts
|
@@ -1817,7 +1844,9 @@ files:
|
|
1817
1844
|
- facts/4.2/redhat-8-x86_64.facts
|
1818
1845
|
- facts/4.2/redhat-9-x86_64.facts
|
1819
1846
|
- facts/4.2/rocky-8-x86_64.facts
|
1847
|
+
- facts/4.2/rocky-9-x86_64.facts
|
1820
1848
|
- facts/4.2/scientific-7-x86_64.facts
|
1849
|
+
- facts/4.2/sles-12-x86_64.facts
|
1821
1850
|
- facts/4.2/sles-15-x86_64.facts
|
1822
1851
|
- facts/4.2/ubuntu-16.04-x86_64.facts
|
1823
1852
|
- facts/4.2/ubuntu-18.04-x86_64.facts
|
@@ -1825,6 +1854,7 @@ files:
|
|
1825
1854
|
- facts/4.2/ubuntu-21.04-x86_64.facts
|
1826
1855
|
- facts/4.2/ubuntu-21.10-x86_64.facts
|
1827
1856
|
- facts/4.2/ubuntu-22.04-x86_64.facts
|
1857
|
+
- facts/4.2/ubuntu-22.10-x86_64.facts
|
1828
1858
|
- facts/4.2/windows-10-x86_64.facts
|
1829
1859
|
- facts/4.2/windows-11-x86_64.facts
|
1830
1860
|
- facts/4.2/windows-2012 r2-x86_64.facts
|
@@ -1835,6 +1865,62 @@ files:
|
|
1835
1865
|
- facts/4.2/windows-2019-x86_64.facts
|
1836
1866
|
- facts/4.2/windows-2022-core-x86_64.facts
|
1837
1867
|
- facts/4.2/windows-2022-x86_64.facts
|
1868
|
+
- facts/4.3/almalinux-8-x86_64.facts
|
1869
|
+
- facts/4.3/almalinux-9-x86_64.facts
|
1870
|
+
- facts/4.3/centos-7-x86_64.facts
|
1871
|
+
- facts/4.3/debian-10-x86_64.facts
|
1872
|
+
- facts/4.3/debian-11-x86_64.facts
|
1873
|
+
- facts/4.3/debian-12-i386.facts
|
1874
|
+
- facts/4.3/debian-12-x86_64.facts
|
1875
|
+
- facts/4.3/fedora-36-x86_64.facts
|
1876
|
+
- facts/4.3/fedora-37-x86_64.facts
|
1877
|
+
- facts/4.3/fedora-38-x86_64.facts
|
1878
|
+
- facts/4.3/opensuse-15-x86_64.facts
|
1879
|
+
- facts/4.3/redhat-8-x86_64.facts
|
1880
|
+
- facts/4.3/rocky-8-x86_64.facts
|
1881
|
+
- facts/4.3/rocky-9-x86_64.facts
|
1882
|
+
- facts/4.3/sles-12-x86_64.facts
|
1883
|
+
- facts/4.3/ubuntu-18.04-x86_64.facts
|
1884
|
+
- facts/4.3/ubuntu-20.04-x86_64.facts
|
1885
|
+
- facts/4.3/ubuntu-22.04-x86_64.facts
|
1886
|
+
- facts/4.3/windows-10-x86_64.facts
|
1887
|
+
- facts/4.3/windows-11-x86_64.facts
|
1888
|
+
- facts/4.3/windows-2012 r2-x86_64.facts
|
1889
|
+
- facts/4.3/windows-2012-x86_64.facts
|
1890
|
+
- facts/4.3/windows-2016-core-x86_64.facts
|
1891
|
+
- facts/4.3/windows-2016-x86_64.facts
|
1892
|
+
- facts/4.3/windows-2019-core-x86_64.facts
|
1893
|
+
- facts/4.3/windows-2019-x86_64.facts
|
1894
|
+
- facts/4.3/windows-2022-core-x86_64.facts
|
1895
|
+
- facts/4.3/windows-2022-x86_64.facts
|
1896
|
+
- facts/4.4/almalinux-8-x86_64.facts
|
1897
|
+
- facts/4.4/almalinux-9-x86_64.facts
|
1898
|
+
- facts/4.4/centos-7-x86_64.facts
|
1899
|
+
- facts/4.4/debian-10-x86_64.facts
|
1900
|
+
- facts/4.4/debian-11-x86_64.facts
|
1901
|
+
- facts/4.4/debian-12-i386.facts
|
1902
|
+
- facts/4.4/debian-12-x86_64.facts
|
1903
|
+
- facts/4.4/fedora-36-x86_64.facts
|
1904
|
+
- facts/4.4/fedora-37-x86_64.facts
|
1905
|
+
- facts/4.4/fedora-38-x86_64.facts
|
1906
|
+
- facts/4.4/opensuse-15-x86_64.facts
|
1907
|
+
- facts/4.4/redhat-8-x86_64.facts
|
1908
|
+
- facts/4.4/rocky-8-x86_64.facts
|
1909
|
+
- facts/4.4/rocky-9-x86_64.facts
|
1910
|
+
- facts/4.4/sles-12-x86_64.facts
|
1911
|
+
- facts/4.4/ubuntu-18.04-x86_64.facts
|
1912
|
+
- facts/4.4/ubuntu-20.04-x86_64.facts
|
1913
|
+
- facts/4.4/ubuntu-22.04-x86_64.facts
|
1914
|
+
- facts/4.4/windows-10-x86_64.facts
|
1915
|
+
- facts/4.4/windows-11-x86_64.facts
|
1916
|
+
- facts/4.4/windows-2012 r2-x86_64.facts
|
1917
|
+
- facts/4.4/windows-2012-x86_64.facts
|
1918
|
+
- facts/4.4/windows-2016-core-x86_64.facts
|
1919
|
+
- facts/4.4/windows-2016-x86_64.facts
|
1920
|
+
- facts/4.4/windows-2019-core-x86_64.facts
|
1921
|
+
- facts/4.4/windows-2019-x86_64.facts
|
1922
|
+
- facts/4.4/windows-2022-core-x86_64.facts
|
1923
|
+
- facts/4.4/windows-2022-x86_64.facts
|
1838
1924
|
- facts/Gemfile
|
1839
1925
|
- facts/Vagrantfile
|
1840
1926
|
- facts/Windows_README.md
|
@@ -1875,14 +1961,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1875
1961
|
requirements:
|
1876
1962
|
- - ">="
|
1877
1963
|
- !ruby/object:Gem::Version
|
1878
|
-
version: 2.
|
1964
|
+
version: 2.7.0
|
1879
1965
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1880
1966
|
requirements:
|
1881
1967
|
- - ">="
|
1882
1968
|
- !ruby/object:Gem::Version
|
1883
1969
|
version: '0'
|
1884
1970
|
requirements: []
|
1885
|
-
rubygems_version: 3.
|
1971
|
+
rubygems_version: 3.4.10
|
1886
1972
|
signing_key:
|
1887
1973
|
specification_version: 4
|
1888
1974
|
summary: A Database of OS facts provided by Facter
|