facterdb 1.11.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +1 -0
  3. data/CHANGELOG.md +59 -0
  4. data/README.md +6 -4
  5. data/Rakefile +2 -0
  6. data/facterdb.gemspec +3 -0
  7. data/facts/1.6/amazon-2017-x86_64.facts +3 -3
  8. data/facts/1.6/archlinux-x86_64.facts +1 -0
  9. data/facts/1.6/fedora-19-i386.facts +1 -0
  10. data/facts/1.6/fedora-19-x86_64.facts +1 -0
  11. data/facts/1.6/ubuntu-18.04-aarch64.facts +1 -1
  12. data/facts/1.7/amazon-2017-x86_64.facts +3 -3
  13. data/facts/1.7/archlinux-x86_64.facts +1 -0
  14. data/facts/1.7/centos-9-x86_64.facts +3 -3
  15. data/facts/1.7/ubuntu-18.04-aarch64.facts +1 -1
  16. data/facts/2.0/amazon-2017-x86_64.facts +3 -3
  17. data/facts/2.0/archlinux-x86_64.facts +1 -0
  18. data/facts/2.0/centos-9-x86_64.facts +3 -3
  19. data/facts/2.0/ubuntu-18.04-aarch64.facts +3 -1
  20. data/facts/2.1/amazon-2017-x86_64.facts +9 -9
  21. data/facts/2.1/archlinux-x86_64.facts +1 -0
  22. data/facts/2.1/centos-9-x86_64.facts +3 -3
  23. data/facts/2.1/ubuntu-18.04-aarch64.facts +3 -2
  24. data/facts/2.2/amazon-2017-x86_64.facts +9 -9
  25. data/facts/2.2/archlinux-x86_64.facts +1 -0
  26. data/facts/2.2/centos-9-x86_64.facts +3 -3
  27. data/facts/2.2/sles-15-x86_64.facts +1 -0
  28. data/facts/2.2/ubuntu-18.04-aarch64.facts +3 -2
  29. data/facts/2.3/amazon-2017-x86_64.facts +9 -9
  30. data/facts/2.3/archlinux-x86_64.facts +1 -0
  31. data/facts/2.3/centos-9-x86_64.facts +3 -3
  32. data/facts/2.3/sles-15-x86_64.facts +1 -0
  33. data/facts/2.3/ubuntu-18.04-aarch64.facts +3 -2
  34. data/facts/2.4/amazon-2017-x86_64.facts +9 -9
  35. data/facts/2.4/archlinux-x86_64.facts +1 -0
  36. data/facts/2.4/centos-9-x86_64.facts +3 -3
  37. data/facts/2.4/sles-15-x86_64.facts +1 -0
  38. data/facts/2.4/ubuntu-18.04-aarch64.facts +3 -2
  39. data/facts/2.4/windows-2012 r2-x64.facts +1 -0
  40. data/facts/2.4/windows-7-x64.facts +1 -0
  41. data/facts/2.5/archlinux-x86_64.facts +1 -0
  42. data/facts/2.5/sles-15-x86_64.facts +2 -0
  43. data/facts/2.5/solaris-10-i86pc.facts +4 -15
  44. data/facts/2.5/ubuntu-18.04-aarch64.facts +3 -2
  45. data/facts/3.0/ubuntu-15.10-i386.facts +6 -0
  46. data/facts/3.0/ubuntu-15.10-x86_64.facts +6 -0
  47. data/facts/3.10/archlinux-x86_64.facts +2 -1
  48. data/facts/3.10/ubuntu-18.04-aarch64.facts +9 -2
  49. data/facts/3.11/archlinux-x86_64.facts +3 -2
  50. data/facts/3.11/solaris-10-i86pc.facts +4 -10
  51. data/facts/3.12/archlinux-x86_64.facts +3 -2
  52. data/facts/3.14/VirtuozzoLinux-7-x86_64.facts +4 -4
  53. data/facts/3.14/archlinux-x86_64.facts +2 -1
  54. data/facts/3.14/centos-9-x86_64.facts +478 -0
  55. data/facts/3.14/rocky-8-x86_64.facts +6 -6
  56. data/facts/3.14/ubuntu-21.04-x86_64.facts +6 -6
  57. data/facts/3.14/ubuntu-21.10-x86_64.facts +609 -0
  58. data/facts/3.2/aix-53-powerpc.facts +8 -2
  59. data/facts/3.2/aix-61-powerpc.facts +8 -2
  60. data/facts/3.2/aix-71-powerpc.facts +8 -2
  61. data/facts/3.6/amazon-2017-x86_64.facts +9 -9
  62. data/facts/3.6/pcs-6-x86_64.facts +8 -2
  63. data/facts/3.9/aix-7.1-power.facts +4 -4
  64. data/facts/3.9/archlinux-x86_64.facts +2 -1
  65. data/facts/3.9/solaris-10-i86pc.facts +4 -10
  66. data/facts/4.0/centos-7-x86_64.facts +3 -16
  67. data/facts/4.0/debian-10-x86_64.facts +3 -17
  68. data/facts/4.0/debian-11-x86_64.facts +256 -68
  69. data/facts/4.0/fedora-32-x86_64.facts +233 -35
  70. data/facts/4.0/fedora-33-x86_64.facts +229 -27
  71. data/facts/4.0/fedora-34-x86_64.facts +234 -33
  72. data/facts/4.0/fedora-35-x86_64.facts +504 -0
  73. data/facts/4.0/freebsd-11-x86_64.facts +237 -22
  74. data/facts/4.0/freebsd-12-x86_64.facts +239 -24
  75. data/facts/4.0/freebsd-13-x86_64.facts +287 -18
  76. data/facts/4.0/oraclelinux-7-x86_64.facts +3 -16
  77. data/facts/4.0/redhat-7-x86_64.facts +3 -16
  78. data/facts/4.0/scientific-7-x86_64.facts +3 -16
  79. data/facts/4.0/solaris-11-sun4v.facts +3 -6
  80. data/facts/4.0/ubuntu-18.04-x86_64.facts +280 -62
  81. data/facts/4.0/ubuntu-20.04-x86_64.facts +365 -75
  82. data/facts/4.0/ubuntu-21.04-x86_64.facts +646 -0
  83. data/facts/4.0/ubuntu-21.10-x86_64.facts +624 -0
  84. data/facts/4.1/debian-11-x86_64.facts +256 -68
  85. data/facts/4.1/fedora-32-x86_64.facts +231 -33
  86. data/facts/4.1/fedora-33-x86_64.facts +229 -27
  87. data/facts/4.1/fedora-34-x86_64.facts +236 -35
  88. data/facts/4.1/fedora-35-x86_64.facts +506 -0
  89. data/facts/4.1/freebsd-11-x86_64.facts +237 -22
  90. data/facts/4.1/freebsd-12-x86_64.facts +239 -24
  91. data/facts/4.1/freebsd-13-x86_64.facts +287 -18
  92. data/facts/4.1/ubuntu-18.04-x86_64.facts +280 -62
  93. data/facts/4.1/ubuntu-20.04-x86_64.facts +365 -75
  94. data/facts/4.1/ubuntu-21.04-x86_64.facts +648 -0
  95. data/facts/4.1/ubuntu-21.10-x86_64.facts +626 -0
  96. data/facts/4.2/centos-9-x86_64.facts +14 -3
  97. data/facts/4.2/fedora-32-x86_64.facts +236 -38
  98. data/facts/4.2/fedora-33-x86_64.facts +229 -27
  99. data/facts/4.2/fedora-35-x86_64.facts +506 -0
  100. data/facts/4.2/freebsd-11-x86_64.facts +22 -22
  101. data/facts/4.2/freebsd-12-x86_64.facts +25 -25
  102. data/facts/4.2/freebsd-13-x86_64.facts +242 -26
  103. data/facts/4.2/oraclelinux-9-x86_64.facts +14 -3
  104. data/facts/4.2/redhat-9-x86_64.facts +14 -3
  105. data/facts/4.2/ubuntu-18.04-x86_64.facts +280 -62
  106. data/facts/4.2/ubuntu-20.04-x86_64.facts +365 -75
  107. data/facts/4.2/ubuntu-21.04-x86_64.facts +654 -0
  108. data/facts/4.2/ubuntu-21.10-x86_64.facts +632 -0
  109. data/facts/Gemfile +2 -0
  110. data/facts/Vagrantfile +29 -62
  111. data/facts/get_facts.sh +10 -184
  112. data/lib/facterdb/version.rb +1 -1
  113. data/spec/facts_spec.rb +33 -27
  114. metadata +15 -4
data/facts/Vagrantfile CHANGED
@@ -23,13 +23,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
23
23
  host.vm.provision "shell", path: "get_facts.sh"
24
24
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
25
25
  end
26
- config.vm.define "linuxmint-18-x86_64" do |host|
27
- host.vm.box = "artem-sidorenko/mint-18.1-cinnamon"
28
- host.vm.provision "shell", inline: "apt-get update && apt-get install -y ruby ruby-dev libc6-dev"
29
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
30
- host.vm.provision "shell", path: "get_facts.sh"
31
- host.vm.provision "shell", inline: "/sbin/shutdown -h now"
32
- end
33
26
  config.vm.define "linuxmint-19-x86_64" do |host|
34
27
  host.vm.box = "ltsp/linuxmint-19.1-cinnamon-64bit"
35
28
  host.vm.provision "shell", inline: "export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y ruby ruby-dev libc6-dev"
@@ -43,6 +36,24 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
43
36
  host.vm.provision "shell", path: "get_facts.sh"
44
37
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
45
38
  end
39
+ config.vm.define "ubuntu-20.04-x86_64" do |host|
40
+ host.vm.box = "ubuntu/focal64"
41
+ host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
42
+ host.vm.provision "shell", path: "get_facts.sh"
43
+ host.vm.provision "shell", inline: "/sbin/shutdown -h now"
44
+ end
45
+ config.vm.define "ubuntu-21.04-x86_64" do |host|
46
+ host.vm.box = "ubuntu/hirsute64"
47
+ host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
48
+ host.vm.provision "shell", path: "get_facts.sh"
49
+ host.vm.provision "shell", inline: "/sbin/shutdown -h now"
50
+ end
51
+ config.vm.define "ubuntu-21.10-x86_64" do |host|
52
+ host.vm.box = "ubuntu/impish64"
53
+ host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
54
+ host.vm.provision "shell", path: "get_facts.sh"
55
+ host.vm.provision "shell", inline: "/sbin/shutdown -h now"
56
+ end
46
57
  config.vm.define "centos-7-x86_64" do |host|
47
58
  host.vm.box = "centos/7"
48
59
  host.vm.network :private_network, ip: '10.0.0.2'
@@ -70,7 +81,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
70
81
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
71
82
  end
72
83
  config.vm.define "rockylinux-8-x86_64" do |host|
73
- host.vm.box = "generic/rocky8"
84
+ host.vm.box = "rockylinux/8"
74
85
  host.vm.synced_folder ".", "/vagrant"
75
86
  host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools"
76
87
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
@@ -115,34 +126,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
115
126
  host.vm.provision "shell", path: "get_facts.sh"
116
127
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
117
128
  end
118
- config.vm.define "opensuse-12-x86_64" do |host|
119
- host.vm.box = "alexeym/opensuse-12.3"
120
- host.vm.provision "shell", inline: "zypper install -y rubygems ruby-devel make gcc"
121
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
122
- host.vm.provision "shell", path: "get_facts.sh"
123
- host.vm.provision "shell", inline: "/sbin/shutdown -h now"
124
- end
125
- config.vm.define "opensuse-13-x86_64" do |host|
126
- host.vm.box = "chef/opensuse-13.1"
127
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
128
- host.vm.provision "shell", path: "get_facts.sh"
129
- host.vm.provision "shell", inline: "/sbin/shutdown -h now"
130
- end
131
- config.vm.define "opensuse-13.2-x86_64" do |host|
132
- host.vm.box = "opensuse/openSUSE-13.2-x86_64"
133
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
134
- host.vm.provision "shell", path: "get_facts.sh"
135
- end
136
- config.vm.define "opensuse-42.1-x86_64" do |host|
137
- host.vm.box = "opensuse/openSUSE-42.1-x86_64"
138
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
139
- host.vm.provision "shell", path: "get_facts.sh"
140
- end
141
- config.vm.define "opensuse-42.2-x86_64" do |host|
142
- host.vm.box = "opensuse/openSUSE-42.2-x86_64"
143
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
144
- host.vm.provision "shell", path: "get_facts.sh"
145
- end
146
129
  config.vm.define "opensuse-42.3-x86_64" do |host|
147
130
  host.vm.box = "opensuse/openSUSE-42.3-x86_64"
148
131
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
@@ -198,32 +181,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
198
181
  host.vm.provision "shell", path: "get_facts.sh"
199
182
  host.vm.provision "shell", inline: "/sbin/shutdown -i S -g0 -y 'Bye' &"
200
183
  end
201
- config.vm.define "openbsd-6.2-x86_64" do |host|
202
- host.vm.box = "bodgit/openbsd-6.2-amd64"
203
- host.vm.network :private_network, ip: '10.0.0.2'
204
- host.vm.synced_folder ".", "/vagrant", :nfs => true
205
- host.vm.provision "shell", inline: <<-SCRIPT.gsub(/^ +/, '')
206
- . ~/.profile
207
-
208
- pkg_info -qe 'bash->=0' || pkg_add -I bash
209
- SCRIPT
210
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
211
- host.vm.provision "shell", path: "get_facts.sh"
212
- host.vm.provision "shell", inline: "/sbin/shutdown -h now"
213
- end
214
- config.vm.define "openbsd-6.3-x86_64" do |host|
215
- host.vm.box = "bodgit/openbsd-6.3-amd64"
216
- host.vm.network :private_network, ip: '10.0.0.2'
217
- host.vm.synced_folder ".", "/vagrant", :nfs => true
218
- host.vm.provision "shell", inline: <<-SCRIPT.gsub(/^ +/, '')
219
- . ~/.profile
220
-
221
- pkg_info -qe 'bash->=0' || pkg_add -I bash
222
- SCRIPT
223
- host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
224
- host.vm.provision "shell", path: "get_facts.sh"
225
- host.vm.provision "shell", inline: "/sbin/shutdown -h now"
226
- end
227
184
  config.vm.define "openbsd-6.4-x86_64" do |host|
228
185
  host.vm.box = "generic/openbsd6"
229
186
  host.vm.box_version = "~> 1.9.18"
@@ -305,4 +262,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
305
262
  host.vm.provision "shell", path: "get_facts.sh"
306
263
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
307
264
  end
265
+ config.vm.define "fedora-35-x86_64" do |host|
266
+ host.vm.box = "generic/fedora35"
267
+ host.vm.synced_folder ".", "/vagrant"
268
+ # there's no official support for fedora 35, so we need ruby 2.7 and facter from Fedora
269
+ host.vm.provision "shell", inline: "dnf -y module install ruby:2.7/default"
270
+ host.vm.provision "shell", inline: "dnf -y install wget make gcc net-tools facter ruby-devel"
271
+ host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
272
+ host.vm.provision "shell", path: "get_facts.sh"
273
+ host.vm.provision "shell", inline: "/sbin/shutdown -h now"
274
+ end
308
275
  end
data/facts/get_facts.sh CHANGED
@@ -30,23 +30,7 @@ elif test -f /usr/bin/apt-get; then
30
30
  osfamily='Debian'
31
31
  elif test -f /etc/redhat-release ; then
32
32
  operatingsystemmajrelease=$(rpm -qf /etc/redhat-release --queryformat '%{version}' | cut -f1 -d'.')
33
- case $(rpm -qf /etc/redhat-release --queryformat '%{name}') in
34
- almalinux*)
35
- osfamily='AlmaLinux'
36
- ;;
37
- centos*|redhat*)
38
- osfamily='RedHat'
39
- ;;
40
- fedora*)
41
- osfamily='Fedora'
42
- ;;
43
- rocky-*)
44
- osfamily='RockyLinux'
45
- ;;
46
- *)
47
- echo 'Failed to determine osfamily from /etc/redhat-release'
48
- exit 1
49
- esac
33
+ osfamily='RedHat'
50
34
  elif test -f '/usr/bin/pacman'; then
51
35
  operatingsystemmajrelease=3
52
36
  osfamily='Archlinux'
@@ -54,118 +38,22 @@ elif test -f '/etc/gentoo-release'; then
54
38
  osfamily='Gentoo'
55
39
  elif test -f '/etc/os-release' && grep -q 'Amazon' '/etc/os-release'; then
56
40
  osfamily='RedHat'
57
- operatingsystemmajrelease=$(rpm -qf /etc/os-release --queryformat '%{version}' | cut -f1 -d'.')
58
- if [[ $operatingsystemmajrelease -eq 2 ]]; then
59
- operatingsystemmajrelease='7'
60
- else
61
- operatingsystemmajrelease='6'
62
- fi
41
+ operatingsystemmajrelease='7'
63
42
  else
64
43
  osfamily=$(uname)
65
44
  fi
66
45
 
67
46
  case "${osfamily}" in
68
- 'Fedora')
69
-
70
- yum install -y "https://yum.puppetlabs.com/puppetlabs-release-pc1-fedora-${operatingsystemmajrelease}.noarch.rpm"
71
- # Puppet 4 doesn't support Fedora 28 anymore
72
- if [[ "${?}" == 0 ]]; then
73
- for puppet_agent_version in 1.5.3-1 1.6.0-1 1.6.1-1 1.6.2-1 1.7.0-1 1.10.12-1; do
74
- dnf install -y "puppet-agent-${puppet_agent_version}.fedoraf${operatingsystemmajrelease}"
75
- if [[ "${?}" == 0 ]]; then
76
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
77
- mkdir -p $(dirname ${output_file})
78
- facter --show-legacy -p -j | tee ${output_file}
79
- fi
80
- done
81
- yum remove -y puppetlabs-release-pc1
82
- fi
83
- # Puppet 5
84
- yum install -y "https://yum.puppetlabs.com/puppet5/puppet5-release-fedora-${operatingsystemmajrelease}.noarch.rpm"
85
- if [[ "${?}" == 0 ]]; then
86
- for puppet_agent_version in 5.3.1-1 5.3.2-1 5.3.3-1 5.3.4-1 5.3.5-1 5.4.0-1 5.5.16-1; do
87
- # Package naming changed with Fedora 28
88
- [[ ${operatingsystemmajrelease} -ge 28 ]] && osprefix='fc' || osprefix='fedoraf'
89
- echo dnf install -y "puppet-agent-${puppet_agent_version}.${osprefix}${operatingsystemmajrelease}"
90
- dnf install -y "puppet-agent-${puppet_agent_version}.${osprefix}${operatingsystemmajrelease}"
91
- if [[ "${?}" == 0 ]]; then
92
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
93
- echo "Outputfile: $output_file"
94
- mkdir -p $(dirname ${output_file})
95
- facter --show-legacy -p -j | tee ${output_file}
96
- fi
97
- done
98
- yum remove -y puppet5-release
99
- fi
100
- # Puppet 6
101
- yum install -y "https://yum.puppetlabs.com/puppet6-release-fedora-${operatingsystemmajrelease}.noarch.rpm"
102
- if [[ "${?}" == 0 ]]; then
103
- for puppet_agent_version in 6.25.0-1; do
104
- dnf install -y "puppet-agent-${puppet_agent_version}.fc${operatingsystemmajrelease}"
105
- if [[ "${?}" == 0 ]]; then
106
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
107
- mkdir -p $(dirname ${output_file})
108
- facter --show-legacy -p -j | tee ${output_file}
109
- fi
110
- done
111
- yum remove -y puppet6-release
112
- fi
113
- # Puppet 7
114
- if [[ $operatingsystemmajrelease == '33' ]] && command -v facter &> /dev/null; then
115
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
116
- mkdir -p $(dirname ${output_file})
117
- facter --show-legacy -p -j | tee ${output_file}
118
- fi
119
- yum install -y "https://yum.puppetlabs.com/puppet7-release-fedora-${operatingsystemmajrelease}.noarch.rpm"
120
- if [[ "${?}" == 0 ]]; then
121
- for puppet_agent_version in 7.12.0-1; do
122
- dnf install -y "puppet-agent-${puppet_agent_version}.fc${operatingsystemmajrelease}"
123
- if [[ "${?}" == 0 ]]; then
124
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
125
- mkdir -p $(dirname ${output_file})
126
- facter --show-legacy -p -j | tee ${output_file}
127
- fi
128
- done
129
- yum remove -y puppet6-release
130
- fi
131
- ;;
132
47
  'RedHat')
133
- if [[ ${operatingsystemmajrelease} -eq 5 ]]; then
134
- # CentOS 5 can no longer wget the release file with HTTPS due to mis-matched SSL support:
135
- http_method='http'
136
- # The default CentOS repositories no longer work and prevent yum from working:
137
- rm -f /etc/yum.repos.d/CentOS*
48
+ . /etc/os-release
49
+ if [[ $ID == fedora ]]; then
50
+ distcode=fedora
138
51
  else
139
- http_method='https'
140
- fi
141
- wget "${http_method}://yum.puppetlabs.com/puppetlabs-release-pc1-el-${operatingsystemmajrelease}.noarch.rpm" -O /tmp/puppetlabs-release-pc1.rpm
142
- if test -f /tmp/puppetlabs-release-pc1.rpm; then
143
- rpm -ivh /tmp/puppetlabs-release-pc1.rpm
144
- for puppet_agent_version in 1.2.2 1.4.2 1.5.3 1.10.4; do
145
- if yum install -y puppet-agent-${puppet_agent_version}; then
146
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
147
- mkdir -p $(dirname ${output_file})
148
- facter --show-legacy -p -j | tee ${output_file}
149
- fi
150
- done
151
- yum remove -y puppetlabs-release-pc1
152
- fi
153
- wget "http://yum.puppetlabs.com/puppet5/puppet5-release-el-${operatingsystemmajrelease}.noarch.rpm" -O /tmp/puppet5-release.rpm
154
- if test -f /tmp/puppet5-release.rpm; then
155
- rpm -ivh /tmp/puppet5-release.rpm
156
- for puppet_agent_version in 5.0.1 5.1.0 5.3.7 5.4.0 5.5.16; do
157
- if yum install -y puppet-agent-${puppet_agent_version}; then
158
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
159
- mkdir -p $(dirname ${output_file})
160
- facter --show-legacy -p -j | tee ${output_file}
161
- fi
162
- done
163
- yum remove -y puppet5-release
52
+ distcode=el
164
53
  fi
165
- wget "http://yum.puppetlabs.com/puppet6-release-el-${operatingsystemmajrelease}.noarch.rpm" -O /tmp/puppet6-release.rpm
166
- if test -f /tmp/puppet6-release.rpm; then
167
- rpm -ivh /tmp/puppet6-release.rpm
168
- for puppet_agent_version in 6.2.0 6.4.2 6.6.0; do
54
+ yum -y install "https://yum.puppetlabs.com/puppet6-release-${distcode}-${operatingsystemmajrelease}.noarch.rpm"
55
+ if [[ "${?}" == 0 ]]; then
56
+ for puppet_agent_version in 6.25.0; do
169
57
  if yum install -y puppet-agent-${puppet_agent_version}; then
170
58
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
171
59
  mkdir -p $(dirname ${output_file})
@@ -187,49 +75,8 @@ case "${osfamily}" in
187
75
  yum remove -y puppet7-release
188
76
  fi
189
77
  ;;
190
- 'RockyLinux'|'AlmaLinux')
191
- dnf localinstall -y "http://yum.puppetlabs.com/puppet6-release-el-${operatingsystemmajrelease}.noarch.rpm"
192
- if dnf install -y puppet-agent; then
193
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
194
- mkdir -p $(dirname ${output_file})
195
- facter --show-legacy -p -j | tee ${output_file}
196
- fi
197
- ;;
198
-
199
78
  'Debian')
200
- if [[ "serena" =~ ${lsbdistcodename} ]]; then
201
- lsbdistcodename='xenial'
202
- fi
203
- if [[ "tessa" =~ ${lsbdistcodename} ]]; then
204
- lsbdistcodename='bionic'
205
- fi
206
79
  apt_install curl
207
- curl "https://apt.puppetlabs.com/puppetlabs-release-pc1-${lsbdistcodename}.deb" -o /tmp/puppetlabs-release-pc1.deb
208
- if test "$?" -eq 0 -a -f /tmp/puppetlabs-release-pc1.deb; then
209
- dpkg --install /tmp/puppetlabs-release-pc1.deb
210
- apt-get update
211
- for puppet_agent_version in 1.2.2 1.4 1.5 1.7 1.8 1.10; do
212
- if apt_install puppet-agent=${puppet_agent_version}*; then
213
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
214
- mkdir -p $(dirname ${output_file})
215
- facter --show-legacy -p -j | tee ${output_file}
216
- fi
217
- done
218
- apt-get -y remove --purge puppetlabs-release-pc1
219
- fi
220
- curl "https://apt.puppetlabs.com/puppet5-release-${lsbdistcodename}.deb" -o /tmp/puppet5-release.deb
221
- if test "$?" -eq 0 -a -f /tmp/puppet5-release.deb; then
222
- dpkg --install /tmp/puppet5-release.deb
223
- apt-get update
224
- for puppet_agent_version in 5.0 5.1 5.3 5.4 5.5; do
225
- if apt_install puppet-agent=${puppet_agent_version}*; then
226
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
227
- mkdir -p $(dirname ${output_file})
228
- facter --show-legacy -p -j | tee ${output_file}
229
- fi
230
- done
231
- apt-get -y remove --purge puppet5-release
232
- fi
233
80
  curl "https://apt.puppetlabs.com/puppet6-release-${lsbdistcodename}.deb" -o /tmp/puppet6-release.deb
234
81
  if test "$?" -eq 0 -a -f /tmp/puppet6-release.deb; then
235
82
  dpkg --install /tmp/puppet6-release.deb
@@ -260,7 +107,7 @@ case "${osfamily}" in
260
107
 
261
108
  # There are no puppet-agent packages for Buster yet, so generate a Facter 3.x
262
109
  # fact set from the official Debian package.
263
- if [[ "buster" = "${lsbdistcodename}" ]]; then
110
+ if [[ "buster" = "${lsbdistcodename}" || "hirsute" =~ ${lsbdistcodename} || "impish" =~ ${lsbdistcodename} ]]; then
264
111
  apt_install ruby rubygems ruby-dev puppet facter
265
112
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
266
113
  mkdir -p $(dirname ${output_file})
@@ -299,27 +146,6 @@ case "${osfamily}" in
299
146
  else
300
147
  http_method='https'
301
148
  fi
302
- if rpm -Uvh ${http_method}://yum.puppet.com/puppetlabs-release-pc1-sles-${operatingsystemmajrelease}.noarch.rpm; then
303
- zypper --gpg-auto-import-keys --non-interactive refresh
304
- for puppet_agent_version in 1.6.2 1.7.2 1.8.3 1.9.3 1.10.8; do
305
- if zypper --non-interactive install puppet-agent-${puppet_agent_version}; then
306
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
307
- mkdir -p $(dirname ${output_file})
308
- facter --show-legacy -p -j | tee ${output_file}
309
- fi
310
- done
311
- zypper --non-interactive remove puppetlabs-release-pc1
312
- fi
313
- if rpm -Uvh ${http_method}://yum.puppet.com/puppet5/puppet5-release-sles-${operatingsystemmajrelease}.noarch.rpm; then
314
- for puppet_agent_version in 5.0.1 5.1.0 5.2.0 5.3.2 5.4.0 5.5.16; do
315
- if zypper --gpg-auto-import-keys --non-interactive install puppet-agent-${puppet_agent_version}; then
316
- output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
317
- mkdir -p $(dirname ${output_file})
318
- facter --show-legacy -p -j | tee ${output_file}
319
- fi
320
- done
321
- zypper --non-interactive remove puppet5-release
322
- fi
323
149
  if rpm -Uvh ${http_method}://yum.puppet.com/puppet6-release-sles-${operatingsystemmajrelease}.noarch.rpm; then
324
150
  for puppet_agent_version in 6.2.0 6.4.2 6.6.0; do
325
151
  if zypper --gpg-auto-import-keys --non-interactive install puppet-agent-${puppet_agent_version}; then
@@ -1,5 +1,5 @@
1
1
  module FacterDB
2
2
  module Version
3
- STRING = '1.11.0'
3
+ STRING = '1.13.0'
4
4
  end
5
5
  end
data/spec/facts_spec.rb CHANGED
@@ -62,26 +62,6 @@ describe 'Default Facts' do
62
62
  end
63
63
  end
64
64
 
65
- KNOWN_IPADDRESS_PENDING = {
66
- 'facts/1.6/fedora-19-i386.facts' => 'unable to regenerate facts',
67
- 'facts/1.6/fedora-19-x86_64.facts' => 'unable to regenerate facts',
68
- 'facts/2.1/archlinux-x86_64.facts' => 'no ifconfig package',
69
- 'facts/3.10/ubuntu-18.04-aarch64.facts' => 'unable to regenerate facts',
70
- 'facts/1.6/archlinux-x86_64.facts' => 'no ifconfig package',
71
- 'facts/2.4/archlinux-x86_64.facts' => 'no ifconfig package',
72
- 'facts/3.2/aix-61-powerpc.facts' => 'unable to regenerate facts',
73
- 'facts/3.2/aix-71-powerpc.facts' => 'unable to regenerate facts',
74
- 'facts/3.2/aix-53-powerpc.facts' => 'unable to regenerate facts',
75
- 'facts/2.3/archlinux-x86_64.facts' => 'no ifconfig package',
76
- 'facts/2.5/archlinux-x86_64.facts' => 'no ifconfig package',
77
- 'facts/1.7/archlinux-x86_64.facts' => 'no ifconfig package',
78
- 'facts/2.0/archlinux-x86_64.facts' => 'no ifconfig package',
79
- 'facts/2.2/archlinux-x86_64.facts' => 'no ifconfig package',
80
- 'facts/3.6/pcs-6-x86_64.facts' => 'unable to regenerate facts',
81
- 'facts/3.0/ubuntu-15.10-x86_64.facts' => 'no puppet-agent package',
82
- 'facts/3.0/ubuntu-15.10-i386.facts' => 'no puppet-agent package',
83
- }
84
-
85
65
  project_dir = Pathname.new(__dir__).parent
86
66
  FacterDB.default_fact_files.each do |filepath|
87
67
  relative_path = Pathname.new(filepath).relative_path_from(project_dir).to_s
@@ -100,15 +80,41 @@ describe 'Default Facts' do
100
80
  expect(content['facterversion']).to have_facter_version(facter_dir_path, filepath)
101
81
  end
102
82
 
103
- it 'contains an ipaddress or networking.ip fact' do
104
- pending KNOWN_IPADDRESS_PENDING[relative_path] if KNOWN_IPADDRESS_PENDING.key?(relative_path)
105
- case content['facterversion']
106
- when /^[1-3]/
107
- expect(content['ipaddress']).to not_be_nil.and not_be_empty
108
- else
83
+ it 'contains newer networking facts hash' do
84
+ if Gem::Version.new(content['facterversion']) >= Gem::Version.new('3.0.0')
109
85
  expect(content['networking']['ip']).to not_be_nil.and not_be_empty
86
+ expect(content['networking']['hostname']).to eq('foo')
87
+ expect(content['networking']['domain']).to eq('example.com')
88
+ expect(content['networking']['fqdn']).to eq('foo.example.com')
110
89
  end
111
-
90
+ end
91
+ it 'contains the legacy ipaddress fact' do
92
+ expect(content['ipaddress']).to not_be_nil.and not_be_empty
93
+ end
94
+ it 'contains no facts from puppetlabs/stdlib' do
95
+ expect(content['root_home']).to be_nil
96
+ expect(content['service_provider']).to be_nil
97
+ expect(content['puppet_vardir']).to be_nil
98
+ expect(content['puppet_environmentpath']).to be_nil
99
+ expect(content['puppet_server']).to be_nil
100
+ expect(content['pe_version']).to be_nil
101
+ expect(content['package_provider']).to be_nil
102
+ end
103
+ it 'contains no facts from puppet/systemd' do
104
+ expect(content['systemd']).to be_nil
105
+ expect(content['systemd_version']).to be_nil
106
+ expect(content['systemd_internal_services']).to be_nil
107
+ end
108
+ it 'contains a legacy hostname, domain and fqdn fact' do
109
+ expect(content['hostname']).to eq('foo')
110
+ expect(content['fqdn']).to eq('foo.example.com')
111
+ expect(content['domain']).to eq('example.com')
112
+ end
113
+ it 'contains the legacy osfamily fact' do
114
+ expect(content['osfamily']).to_not be_nil
115
+ end
116
+ it 'contains the legacy operatingsystem fact' do
117
+ expect(content['operatingsystem']).to_not be_nil
112
118
  end
113
119
  end
114
120
  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.11.0
4
+ version: 1.13.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: 2021-11-05 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -1313,6 +1313,7 @@ files:
1313
1313
  - facts/3.14/centos-6-x86_64.facts
1314
1314
  - facts/3.14/centos-7-x86_64.facts
1315
1315
  - facts/3.14/centos-8-x86_64.facts
1316
+ - facts/3.14/centos-9-x86_64.facts
1316
1317
  - facts/3.14/darwin-16-x86_64.facts
1317
1318
  - facts/3.14/darwin-17-x86_64.facts
1318
1319
  - facts/3.14/darwin-18-x86_64.facts
@@ -1355,6 +1356,7 @@ files:
1355
1356
  - facts/3.14/ubuntu-18.04-x86_64.facts
1356
1357
  - facts/3.14/ubuntu-20.04-x86_64.facts
1357
1358
  - facts/3.14/ubuntu-21.04-x86_64.facts
1359
+ - facts/3.14/ubuntu-21.10-x86_64.facts
1358
1360
  - facts/3.14/windows-10-i386.facts
1359
1361
  - facts/3.14/windows-10-x86_64.facts
1360
1362
  - facts/3.14/windows-2012 r2-core-x86_64.facts
@@ -1744,6 +1746,7 @@ files:
1744
1746
  - facts/4.0/fedora-32-x86_64.facts
1745
1747
  - facts/4.0/fedora-33-x86_64.facts
1746
1748
  - facts/4.0/fedora-34-x86_64.facts
1749
+ - facts/4.0/fedora-35-x86_64.facts
1747
1750
  - facts/4.0/freebsd-11-x86_64.facts
1748
1751
  - facts/4.0/freebsd-12-x86_64.facts
1749
1752
  - facts/4.0/freebsd-13-x86_64.facts
@@ -1755,11 +1758,14 @@ files:
1755
1758
  - facts/4.0/solaris-11-sun4v.facts
1756
1759
  - facts/4.0/ubuntu-18.04-x86_64.facts
1757
1760
  - facts/4.0/ubuntu-20.04-x86_64.facts
1761
+ - facts/4.0/ubuntu-21.04-x86_64.facts
1762
+ - facts/4.0/ubuntu-21.10-x86_64.facts
1758
1763
  - facts/4.1/almalinux-8-x86_64.facts
1759
1764
  - facts/4.1/debian-11-x86_64.facts
1760
1765
  - facts/4.1/fedora-32-x86_64.facts
1761
1766
  - facts/4.1/fedora-33-x86_64.facts
1762
1767
  - facts/4.1/fedora-34-x86_64.facts
1768
+ - facts/4.1/fedora-35-x86_64.facts
1763
1769
  - facts/4.1/freebsd-11-x86_64.facts
1764
1770
  - facts/4.1/freebsd-12-x86_64.facts
1765
1771
  - facts/4.1/freebsd-13-x86_64.facts
@@ -1767,6 +1773,8 @@ files:
1767
1773
  - facts/4.1/rocky-8-x86_64.facts
1768
1774
  - facts/4.1/ubuntu-18.04-x86_64.facts
1769
1775
  - facts/4.1/ubuntu-20.04-x86_64.facts
1776
+ - facts/4.1/ubuntu-21.04-x86_64.facts
1777
+ - facts/4.1/ubuntu-21.10-x86_64.facts
1770
1778
  - facts/4.2/almalinux-8-x86_64.facts
1771
1779
  - facts/4.2/centos-7-x86_64.facts
1772
1780
  - facts/4.2/centos-8-x86_64.facts
@@ -1778,6 +1786,7 @@ files:
1778
1786
  - facts/4.2/fedora-32-x86_64.facts
1779
1787
  - facts/4.2/fedora-33-x86_64.facts
1780
1788
  - facts/4.2/fedora-34-x86_64.facts
1789
+ - facts/4.2/fedora-35-x86_64.facts
1781
1790
  - facts/4.2/freebsd-11-x86_64.facts
1782
1791
  - facts/4.2/freebsd-12-x86_64.facts
1783
1792
  - facts/4.2/freebsd-13-x86_64.facts
@@ -1791,6 +1800,8 @@ files:
1791
1800
  - facts/4.2/scientific-7-x86_64.facts
1792
1801
  - facts/4.2/ubuntu-18.04-x86_64.facts
1793
1802
  - facts/4.2/ubuntu-20.04-x86_64.facts
1803
+ - facts/4.2/ubuntu-21.04-x86_64.facts
1804
+ - facts/4.2/ubuntu-21.10-x86_64.facts
1794
1805
  - facts/Gemfile
1795
1806
  - facts/Vagrantfile
1796
1807
  - facts/Windows_README.md
@@ -1831,14 +1842,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
1831
1842
  requirements:
1832
1843
  - - ">="
1833
1844
  - !ruby/object:Gem::Version
1834
- version: '0'
1845
+ version: 2.5.0
1835
1846
  required_rubygems_version: !ruby/object:Gem::Requirement
1836
1847
  requirements:
1837
1848
  - - ">="
1838
1849
  - !ruby/object:Gem::Version
1839
1850
  version: '0'
1840
1851
  requirements: []
1841
- rubygems_version: 3.2.22
1852
+ rubygems_version: 3.2.32
1842
1853
  signing_key:
1843
1854
  specification_version: 4
1844
1855
  summary: A Database of OS facts provided by Facter