facterdb 1.26.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +15 -35
  4. data/Rakefile +2 -0
  5. data/facts/3.14/almalinux-8-x86_64.facts +97 -117
  6. data/facts/3.14/almalinux-9-x86_64.facts +231 -106
  7. data/facts/3.14/centos-9-x86_64.facts +167 -87
  8. data/facts/3.14/redhat-8-x86_64.facts +230 -100
  9. data/facts/3.14/redhat-9-x86_64.facts +594 -0
  10. data/facts/3.14/rocky-9-x86_64.facts +155 -94
  11. data/facts/3.14/ubuntu-22.04-x86_64.facts +147 -146
  12. data/facts/4.2/almalinux-8-x86_64.facts +114 -133
  13. data/facts/4.2/almalinux-9-x86_64.facts +245 -121
  14. data/facts/4.2/centos-8-x86_64.facts +108 -178
  15. data/facts/4.2/centos-9-x86_64.facts +428 -146
  16. data/facts/4.2/redhat-8-x86_64.facts +59 -59
  17. data/facts/4.2/redhat-9-x86_64.facts +62 -62
  18. data/facts/4.2/rocky-9-x86_64.facts +169 -108
  19. data/facts/4.2/ubuntu-22.04-x86_64.facts +141 -150
  20. data/facts/4.3/almalinux-8-x86_64.facts +105 -125
  21. data/facts/4.3/almalinux-9-x86_64.facts +238 -114
  22. data/facts/4.3/centos-8-x86_64.facts +87 -87
  23. data/facts/4.3/centos-9-x86_64.facts +102 -82
  24. data/facts/4.3/redhat-8-x86_64.facts +52 -52
  25. data/facts/4.3/redhat-9-x86_64.facts +56 -56
  26. data/facts/4.3/rocky-9-x86_64.facts +161 -100
  27. data/facts/4.3/ubuntu-22.04-x86_64.facts +131 -141
  28. data/facts/4.3/windows-10-x86_64.facts +107 -62
  29. data/facts/4.3/windows-11-x86_64.facts +116 -71
  30. data/facts/4.3/windows-2019-x86_64.facts +108 -64
  31. data/facts/4.3/windows-2022-x86_64.facts +106 -62
  32. data/facts/4.4/almalinux-8-x86_64.facts +108 -128
  33. data/facts/4.4/almalinux-9-x86_64.facts +241 -117
  34. data/facts/4.4/centos-8-x86_64.facts +90 -90
  35. data/facts/4.4/centos-9-x86_64.facts +105 -85
  36. data/facts/4.4/redhat-8-x86_64.facts +55 -55
  37. data/facts/4.4/redhat-9-x86_64.facts +58 -58
  38. data/facts/4.4/rocky-9-x86_64.facts +162 -101
  39. data/facts/4.4/ubuntu-22.04-x86_64.facts +134 -144
  40. data/facts/4.4/windows-10-x86_64.facts +107 -62
  41. data/facts/4.4/windows-11-x86_64.facts +115 -74
  42. data/facts/4.4/windows-2019-x86_64.facts +108 -64
  43. data/facts/4.4/windows-2022-x86_64.facts +108 -64
  44. data/facts/4.5/almalinux-8-x86_64.facts +105 -105
  45. data/facts/4.5/almalinux-9-x86_64.facts +238 -116
  46. data/facts/4.5/centos-8-x86_64.facts +93 -93
  47. data/facts/4.5/centos-9-x86_64.facts +108 -90
  48. data/facts/4.5/redhat-8-x86_64.facts +52 -52
  49. data/facts/4.5/redhat-9-x86_64.facts +55 -55
  50. data/facts/4.5/rocky-9-x86_64.facts +167 -106
  51. data/facts/4.5/ubuntu-22.04-x86_64.facts +135 -145
  52. data/facts/4.6/almalinux-8-x86_64.facts +539 -0
  53. data/facts/4.6/almalinux-9-x86_64.facts +657 -0
  54. data/facts/4.6/centos-8-x86_64.facts +529 -0
  55. data/facts/4.6/centos-9-x86_64.facts +593 -0
  56. data/facts/4.6/redhat-8-x86_64.facts +52 -52
  57. data/facts/4.6/redhat-9-x86_64.facts +55 -55
  58. data/facts/4.6/rocky-9-x86_64.facts +695 -0
  59. data/facts/4.6/ubuntu-22.04-x86_64.facts +653 -0
  60. data/facts/4.6/windows-10-x86_64.facts +227 -0
  61. data/facts/4.6/windows-11-x86_64.facts +227 -0
  62. data/facts/4.6/windows-2019-x86_64.facts +225 -0
  63. data/facts/4.6/windows-2022-x86_64.facts +227 -0
  64. data/facts/4.7/almalinux-8-x86_64.facts +539 -0
  65. data/facts/4.7/almalinux-9-x86_64.facts +657 -0
  66. data/facts/4.7/centos-8-x86_64.facts +529 -0
  67. data/facts/4.7/centos-9-x86_64.facts +593 -0
  68. data/facts/4.7/redhat-8-x86_64.facts +580 -0
  69. data/facts/4.7/redhat-9-x86_64.facts +631 -0
  70. data/facts/4.7/rocky-9-x86_64.facts +695 -0
  71. data/facts/4.7/ubuntu-22.04-x86_64.facts +653 -0
  72. data/facts/4.7/windows-10-x86_64.facts +227 -0
  73. data/facts/4.7/windows-11-x86_64.facts +227 -0
  74. data/facts/4.7/windows-2019-x86_64.facts +225 -0
  75. data/facts/4.7/windows-2022-x86_64.facts +227 -0
  76. data/facts/README.md +101 -0
  77. data/facts/Vagrantfile +29 -12
  78. data/facts/get_facts.sh +6 -5
  79. data/facts/windows_get_facts.ps1 +51 -13
  80. data/lib/facterdb/version.rb +1 -1
  81. metadata +26 -3
  82. data/facts/Windows_README.md +0 -11
data/facts/get_facts.sh CHANGED
@@ -42,7 +42,8 @@ elif test -f '/etc/os-release' && grep -q 'Amazon' '/etc/os-release'; then
42
42
  else
43
43
  osfamily=$(uname)
44
44
  fi
45
-
45
+ puppet7_agent_versions='7.9.0 7.10.0 7.11.0 7.12.0 7.12.1. 7.13.1 7.14.0 7.15.0 7.16.0 7.17.0 7.18.0 7.19.0 7.20.0 7.21.0 7.23.0 7.24.0 7.25.0 7.26.0 7.27.0 7.28.0 7.29.0 7.29.1 7.30.0'
46
+ puppet8_agent_versions='8.0.0 8.1.0 8.2.0 8.3.1 8.4.0 8.5.0 8.5.1 8.6.0'
46
47
  case "${osfamily}" in
47
48
  'RedHat')
48
49
  . /etc/os-release
@@ -65,7 +66,7 @@ case "${osfamily}" in
65
66
  wget "http://yum.puppetlabs.com/puppet7-release-el-${operatingsystemmajrelease}.noarch.rpm" -O /tmp/puppet7-release.rpm
66
67
  if test -f /tmp/puppet7-release.rpm; then
67
68
  rpm -ivh /tmp/puppet7-release.rpm
68
- for puppet_agent_version in 7.5.0 7.6.1 7.17.0 7.24.0; do
69
+ for puppet_agent_version in $puppet7_agent_versions; do
69
70
  if yum install -y puppet-agent-${puppet_agent_version}; then
70
71
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
71
72
  mkdir -p $(dirname ${output_file})
@@ -77,7 +78,7 @@ case "${osfamily}" in
77
78
  wget "http://yum.puppetlabs.com/puppet8-release-el-${operatingsystemmajrelease}.noarch.rpm" -O /tmp/puppet8-release.rpm
78
79
  if test -f /tmp/puppet8-release.rpm; then
79
80
  rpm -ivh /tmp/puppet8-release.rpm
80
- for puppet_agent_version in 8.0.0; do
81
+ for puppet_agent_version in $puppet8_agent_versions; do
81
82
  if yum install -y puppet-agent-${puppet_agent_version}; then
82
83
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter os.name | tr '[:upper:]' '[:lower:]')-$(facter os.release.major)-$(facter os.hardware).facts"
83
84
  mkdir -p $(dirname ${output_file})
@@ -112,7 +113,7 @@ case "${osfamily}" in
112
113
  if test "$?" -eq 0 -a -f /tmp/puppet7-release.deb && [[ "$(file -b /tmp/puppet7-release.deb)" =~ "Debian binary package".* ]] ; then
113
114
  dpkg --install /tmp/puppet7-release.deb
114
115
  apt-get update
115
- for puppet_agent_version in 7.9.0 7.10.0 7.11.0 7.12.0 7.12.1. 7.13.1 7.14.0 7.15.0 7.16.0 7.17.0 7.18.0 7.19.0 7.20.0 7.21.0 7.23.0 7.24.0 7.25.0 7.26.0 7.27.0 7.28.0 7.29.0 7.29.1 7.30.0; do
116
+ for puppet_agent_version in $puppet7_agent_versions; do
116
117
  if apt_install puppet-agent=${puppet_agent_version}*; then
117
118
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
118
119
  mkdir -p $(dirname ${output_file})
@@ -126,7 +127,7 @@ case "${osfamily}" in
126
127
  if test "$?" -eq 0 -a -f /tmp/puppet8-release.deb && [[ "$(file -b /tmp/puppet8-release.deb)" =~ "Debian binary package".* ]] ; then
127
128
  dpkg --install /tmp/puppet8-release.deb
128
129
  apt-get update
129
- for puppet_agent_version in 8.0.0 8.1.0 8.2.0 8.3.1 8.4.0 8.5.0 8.5.1 8.6.0; do
130
+ for puppet_agent_version in $puppet8_agent_versions; do
130
131
  if apt_install puppet-agent=${puppet_agent_version}*; then
131
132
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter os.name | tr '[:upper:]' '[:lower:]')-$(facter os.release.major)-$(facter os.hardware).facts"
132
133
  mkdir -p $(dirname ${output_file})
@@ -1,10 +1,29 @@
1
1
  param(
2
- [array]$puppetAgentVersions = ('1.1.1','1.2.2','1.4.0'),
3
- [string]$baseUrl = 'https://downloads.puppetlabs.com/windows',
2
+ [array]$puppetAgentVersions = ('7.24.0','8.0.0','8.5.1','8.6.0'),
3
+ [string]$baseUrl = 'https://downloads.puppetlabs.com/windows/puppet{0}/puppet-agent-{1}-{2}.msi',
4
4
  [string]$fqdn = 'foo.example.com'
5
5
  )
6
6
 
7
- $PuppetInstallerPath = 'c:\vagrantshared\resources\installers'
7
+ $ComputerName = "foo"
8
+ $ComputerDomain = "example.com"
9
+
10
+ Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
11
+ Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
12
+ Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Domain"
13
+
14
+ Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
15
+ Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
16
+ Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName
17
+ Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName
18
+ Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name Domain -Value $ComputerDomain
19
+ Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name DhcpDomain -Value $ComputerDomain
20
+
21
+ # This doesn't work even though net use does???
22
+ #New-SmbMapping -LocalPath 'X:' -RemotePath '\\VBOXSVR\vagrant'
23
+ net use X: \\VBOXSVR\vagrant
24
+
25
+ $VagrantDataPath = 'X:\'
26
+ $WorkingDirectory = 'C:\vagrant_working_directory\'
8
27
 
9
28
  # Make sure we have enough privs to install the things.
10
29
  $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
@@ -14,21 +33,28 @@ if (! ($currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Admin
14
33
  }
15
34
 
16
35
  # Create our tmp dir if it's not found
17
- if (!(Test-Path $PuppetInstallerPath)) {
18
- Write-Host "Creating folder `'$PuppetInstallerPath`'"
19
- $null = New-Item -Path "$PuppetInstallerPath" -ItemType Directory
36
+ if (!(Test-Path $WorkingDirectory)) {
37
+ Write-Host "Creating folder `'$WorkingDirectory`'"
38
+ $null = New-Item -Path "$WorkingDirectory" -ItemType Directory
20
39
  }
21
40
 
22
41
  # Install each puppet version & collect facts.
23
42
  foreach ($pupAgentVer in $puppetAgentVersions) {
24
- $agentUrl = "$baseUrl/puppet-agent-$pupAgentVer-x64.msi"
25
- $agentInstaller = Join-Path $PuppetInstallerPath "puppet-agent-$pupAgentVer-x64.msi"
43
+
44
+ $agentUrl = $baseUrl -f $pupAgentVer[0], $pupAgentVer, "x64"
45
+ $agentName = "puppet-agent-{1}-{2}.msi" -f $pupAgentVer[0], $pupAgentVer, "x64"
46
+ $agentLogNameI = "puppet-{1}-install.log" -f $pupAgentVer[0], $pupAgentVer, "x64"
47
+ $agentLogNameU = "puppet-{1}-uninstall.log" -f $pupAgentVer[0], $pupAgentVer, "x64"
48
+ $agentInstaller = Join-Path $WorkingDirectory $agentName
49
+ $agentLogPathI = Join-Path $WorkingDirectory $agentLogNameI
50
+ $agentLogPathU = Join-Path $WorkingDirectory $agentLogNameU
26
51
 
27
52
  write-Host "Downloading `'$agentUrl`' to `'$agentInstaller`'"
28
53
  (New-Object Net.WebClient).DownloadFile("$agentUrl", "$agentInstaller")
29
54
 
30
- #Install the actual agent, and
31
- $install_args = @("/qn", "/norestart", "/i", "$agentInstaller", "PUPPET_AGENT_CERTNAME=$fqdn")
55
+ #Install the actual agent
56
+ $install_args = @("/l*v $agentLogPathI", "/qn", "/norestart", "/i", "$agentInstaller", "PUPPET_AGENT_CERTNAME=$fqdn")
57
+ $uninstall_args = @("/l*v $agentLogPathU", "/qn", "/norestart", "/x", "$agentInstaller")
32
58
  Write-Host "Installing Puppet. running msiexec.exe $install_args"
33
59
  $agentProcess = Start-Process -FilePath msiexec.exe -ArgumentList $install_args -Wait -PassThru
34
60
  if ($agentProcess.ExitCode -ne 0) {
@@ -49,12 +75,24 @@ foreach ($pupAgentVer in $puppetAgentVersions) {
49
75
  # the domain name will fallback to the hypervisor's domain.
50
76
  $env:FACTER_fqdn = $fqdn
51
77
 
52
- $facterArgs = @("-j")
53
- $facterProcess = Start-Process -FilePath $facterBin -ArgumentList $facterArgs -Wait -PassThru -RedirectStandardOutput "C:\vagrant\$facterVer\$Os-$Osmaj-$Hw.facts"
78
+ $facterArgs = @("-j", "-p", "--show-legacy")
79
+ $facterProcess = Start-Process -FilePath $facterBin -ArgumentList $facterArgs -Wait -PassThru -RedirectStandardOutput "X:\$facterVer\$Os-$Osmaj-$Hw.facts"
54
80
  if ($facterProcess.ExitCode -ne 0) {
55
81
  Write-Host "Facter failed."
56
82
  Exit 1
57
83
  }
84
+
85
+ # dos2unix: `n in Powershell is a LF character
86
+ ((Get-Content "X:\$facterVer\$Os-$Osmaj-$Hw.facts") -join "`n") + "`n" | Set-Content -NoNewline "X:\$facterVer\$Os-$Osmaj-$Hw.facts"
87
+
58
88
  Write-Host "Facts collected for $Os-$Osmaj-$Hw with facter $facterVer"
59
- }
60
89
 
90
+ Write-Host "Uninstalling Puppet. running msiexec.exe $uninstall_args"
91
+ $agentProcess = Start-Process -FilePath msiexec.exe -ArgumentList $uninstall_args -Wait -PassThru
92
+ if ($agentProcess.ExitCode -ne 0) {
93
+ Write-Host "Installer failed."
94
+ Exit 1
95
+ }
96
+ Write-Host "Puppet Agent $pupAgentVer successfully uninstalled."
97
+
98
+ }
@@ -1,5 +1,5 @@
1
1
  module FacterDB
2
2
  module Version
3
- STRING = '1.26.0'
3
+ STRING = '1.27.0'
4
4
  end
5
5
  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.26.0
4
+ version: 1.27.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: 2024-05-14 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -1364,6 +1364,7 @@ files:
1364
1364
  - facts/3.14/redhat-6-x86_64.facts
1365
1365
  - facts/3.14/redhat-7-x86_64.facts
1366
1366
  - facts/3.14/redhat-8-x86_64.facts
1367
+ - facts/3.14/redhat-9-x86_64.facts
1367
1368
  - facts/3.14/rocky-8-x86_64.facts
1368
1369
  - facts/3.14/rocky-9-x86_64.facts
1369
1370
  - facts/3.14/scientific-6-x86_64.facts
@@ -1958,16 +1959,38 @@ files:
1958
1959
  - facts/4.5/ubuntu-18.04-x86_64.facts
1959
1960
  - facts/4.5/ubuntu-20.04-x86_64.facts
1960
1961
  - facts/4.5/ubuntu-22.04-x86_64.facts
1962
+ - facts/4.6/almalinux-8-x86_64.facts
1963
+ - facts/4.6/almalinux-9-x86_64.facts
1964
+ - facts/4.6/centos-8-x86_64.facts
1965
+ - facts/4.6/centos-9-x86_64.facts
1961
1966
  - facts/4.6/debian-11-x86_64.facts
1962
1967
  - facts/4.6/debian-12-x86_64.facts
1963
1968
  - facts/4.6/redhat-8-x86_64.facts
1964
1969
  - facts/4.6/redhat-9-x86_64.facts
1970
+ - facts/4.6/rocky-9-x86_64.facts
1971
+ - facts/4.6/ubuntu-22.04-x86_64.facts
1972
+ - facts/4.6/windows-10-x86_64.facts
1973
+ - facts/4.6/windows-11-x86_64.facts
1974
+ - facts/4.6/windows-2019-x86_64.facts
1975
+ - facts/4.6/windows-2022-x86_64.facts
1976
+ - facts/4.7/almalinux-8-x86_64.facts
1977
+ - facts/4.7/almalinux-9-x86_64.facts
1978
+ - facts/4.7/centos-8-x86_64.facts
1979
+ - facts/4.7/centos-9-x86_64.facts
1965
1980
  - facts/4.7/debian-11-x86_64.facts
1966
1981
  - facts/4.7/debian-12-x86_64.facts
1967
1982
  - facts/4.7/openbsd-7-x86_64.facts
1983
+ - facts/4.7/redhat-8-x86_64.facts
1984
+ - facts/4.7/redhat-9-x86_64.facts
1985
+ - facts/4.7/rocky-9-x86_64.facts
1986
+ - facts/4.7/ubuntu-22.04-x86_64.facts
1987
+ - facts/4.7/windows-10-x86_64.facts
1988
+ - facts/4.7/windows-11-x86_64.facts
1989
+ - facts/4.7/windows-2019-x86_64.facts
1990
+ - facts/4.7/windows-2022-x86_64.facts
1968
1991
  - facts/Gemfile
1992
+ - facts/README.md
1969
1993
  - facts/Vagrantfile
1970
- - facts/Windows_README.md
1971
1994
  - facts/get_facts.sh
1972
1995
  - facts/windows_get_facts.ps1
1973
1996
  - facts/windows_packer/2012r2core.json
@@ -1,11 +0,0 @@
1
- At the time of writing there are not suitable publicly available windows server
2
- vagrant boxes that can be used to generate the facts.
3
-
4
- In order to make fact collection reproducible, I have included packer templates
5
- so boxes can be rebuilt.
6
-
7
- run `packer build <file>.json`
8
- followed by `vagrant add <boxname> <boxfile>`
9
-
10
- Once the box is added a simple `vagrant up <windows_os_name>` will collect all the facts in the same manner as the unix based hosts.
11
-