simp-beaker-helpers 1.33.0 → 1.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/simp/beaker_helpers/inspec.rb +2 -2
- data/lib/simp/beaker_helpers/ssg.rb +49 -2
- data/lib/simp/beaker_helpers/version.rb +1 -1
- data/lib/simp/beaker_helpers.rb +7 -8
- data/spec/acceptance/nodesets/default.yml +4 -13
- data/spec/acceptance/nodesets/docker.yml +4 -12
- data/spec/acceptance/nodesets/oel.yml +8 -8
- data/spec/acceptance/suites/default/install_simp_deps_repo_spec.rb +19 -3
- data/spec/acceptance/suites/inspec/00_default_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79191cfba7b21796d7033045d2db68a654ed8f9b44c18e0a9567cb1da23c43c5
|
4
|
+
data.tar.gz: 525d02af1dfd2cbd8b6930b093027683b5970b211c34be85ed5d7702436fdb6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d778b165ecd69730ad57613644640d31e3df0966fbaf302d91536c1fb469daa22cc6e8dd039bfc8b69e81b68705c36c1607cd5eda6c1b5cab9cb31e826d2d9cc
|
7
|
+
data.tar.gz: d922c5011c991f395c9fbeea86c39a6ffde935e60a927538ada24f927a512cf1c52f6e3abb061f92441b013a89aff39fa5f27a099fd233ca326fd6b814120591
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
### 1.34.1 / 2024-12-17
|
2
|
+
* Fixed:
|
3
|
+
* Error when no domain is set (#222)
|
4
|
+
|
5
|
+
### 1.34.0 / 2024-09-17
|
6
|
+
* Fixed:
|
7
|
+
* Legacy fact usage
|
8
|
+
* Added:
|
9
|
+
* EL9 support in Simp::BeakerHelpers::SSG
|
10
|
+
|
1
11
|
### 1.33.0 / 2024-06-05
|
2
12
|
* Fixed:
|
3
13
|
* Update gem dependencies
|
@@ -46,8 +46,8 @@ module Simp::BeakerHelpers
|
|
46
46
|
@sut.install_package("inspec-#{@inspec_version}")
|
47
47
|
end
|
48
48
|
|
49
|
-
os = fact_on(@sut, '
|
50
|
-
os_rel = fact_on(@sut, '
|
49
|
+
os = fact_on(@sut, 'os.name')
|
50
|
+
os_rel = fact_on(@sut, 'os.release.major')
|
51
51
|
|
52
52
|
@profile = "#{os}-#{os_rel}-#{profile}"
|
53
53
|
@profile_dir = '/tmp/inspec/inspec_profiles'
|
@@ -28,7 +28,7 @@ module Simp::BeakerHelpers
|
|
28
28
|
'openscap-utils',
|
29
29
|
'python-jinja2',
|
30
30
|
'python-lxml',
|
31
|
-
'python-setuptools'
|
31
|
+
'python-setuptools',
|
32
32
|
]
|
33
33
|
|
34
34
|
EL8_PACKAGES = [
|
@@ -43,7 +43,22 @@ module Simp::BeakerHelpers
|
|
43
43
|
'python3-lxml',
|
44
44
|
'python3-pyyaml',
|
45
45
|
'python3-setuptools',
|
46
|
-
'libarchive'
|
46
|
+
'libarchive',
|
47
|
+
]
|
48
|
+
|
49
|
+
EL9_PACKAGES = [
|
50
|
+
'cmake',
|
51
|
+
'git',
|
52
|
+
'make',
|
53
|
+
'openscap-python3',
|
54
|
+
'openscap-utils',
|
55
|
+
'openscap-scanner',
|
56
|
+
'python3',
|
57
|
+
'python3-jinja2',
|
58
|
+
'python3-lxml',
|
59
|
+
'python3-pyyaml',
|
60
|
+
'python3-setuptools',
|
61
|
+
'libarchive',
|
47
62
|
]
|
48
63
|
|
49
64
|
OS_INFO = {
|
@@ -71,6 +86,14 @@ module Simp::BeakerHelpers
|
|
71
86
|
'build_target' => 'rhel8',
|
72
87
|
'datastream' => 'ssg-rhel8-ds.xml'
|
73
88
|
}
|
89
|
+
},
|
90
|
+
'9' => {
|
91
|
+
'required_packages' => EL9_PACKAGES,
|
92
|
+
'ssg' => {
|
93
|
+
'profile_target' => 'rhel9',
|
94
|
+
'build_target' => 'rhel9',
|
95
|
+
'datastream' => 'ssg-rhel9-ds.xml'
|
96
|
+
}
|
74
97
|
}
|
75
98
|
},
|
76
99
|
'CentOS' => {
|
@@ -97,6 +120,14 @@ module Simp::BeakerHelpers
|
|
97
120
|
'build_target' => 'centos8',
|
98
121
|
'datastream' => 'ssg-centos8-ds.xml'
|
99
122
|
}
|
123
|
+
},
|
124
|
+
'9' => {
|
125
|
+
'required_packages' => EL9_PACKAGES,
|
126
|
+
'ssg' => {
|
127
|
+
'profile_target' => 'cs9',
|
128
|
+
'build_target' => 'cs9',
|
129
|
+
'datastream' => 'ssg-cs9-ds.xml'
|
130
|
+
}
|
100
131
|
}
|
101
132
|
},
|
102
133
|
'Rocky' => {
|
@@ -107,6 +138,14 @@ module Simp::BeakerHelpers
|
|
107
138
|
'build_target' => 'centos8',
|
108
139
|
'datastream' => 'ssg-centos8-ds.xml'
|
109
140
|
}
|
141
|
+
},
|
142
|
+
'9' => {
|
143
|
+
'required_packages' => EL9_PACKAGES,
|
144
|
+
'ssg' => {
|
145
|
+
'profile_target' => 'cs9',
|
146
|
+
'build_target' => 'cs9',
|
147
|
+
'datastream' => 'ssg-cs9-ds.xml'
|
148
|
+
}
|
110
149
|
}
|
111
150
|
},
|
112
151
|
'OracleLinux' => {
|
@@ -125,6 +164,14 @@ module Simp::BeakerHelpers
|
|
125
164
|
'build_target' => 'ol8',
|
126
165
|
'datastream' => 'ssg-ol8-ds.xml'
|
127
166
|
}
|
167
|
+
},
|
168
|
+
'9' => {
|
169
|
+
'required_packages' => EL9_PACKAGES,
|
170
|
+
'ssg' => {
|
171
|
+
'profile_target' => 'ol9',
|
172
|
+
'build_target' => 'ol9',
|
173
|
+
'datastream' => 'ssg-ol9-ds.xml'
|
174
|
+
}
|
128
175
|
}
|
129
176
|
}
|
130
177
|
}
|
data/lib/simp/beaker_helpers.rb
CHANGED
@@ -723,10 +723,10 @@ module Simp::BeakerHelpers
|
|
723
723
|
os_info = fact_on(sut, 'os')
|
724
724
|
|
725
725
|
# Make sure we have a domain on our host
|
726
|
-
current_domain = fact_on(sut, 'domain')
|
727
|
-
hostname = fact_on(sut, 'hostname').strip
|
726
|
+
current_domain = fact_on(sut, 'networking.domain')&.strip
|
727
|
+
hostname = fact_on(sut, 'networking.hostname').strip
|
728
728
|
|
729
|
-
if current_domain.empty?
|
729
|
+
if current_domain.nil? || current_domain.empty?
|
730
730
|
new_fqdn = hostname + '.beaker.test'
|
731
731
|
|
732
732
|
safe_sed(sut, 's/#{hostname}.*/#{new_fqdn} #{hostname}/', '/etc/hosts')
|
@@ -744,9 +744,8 @@ module Simp::BeakerHelpers
|
|
744
744
|
end
|
745
745
|
end
|
746
746
|
|
747
|
-
|
748
|
-
|
749
|
-
end
|
747
|
+
current_domain = fact_on(sut, 'networking.domain')&.strip
|
748
|
+
fail("Error: hosts must have an FQDN, got domain='#{current_domain}'") if current_domain.nil? || current_domain.empty?
|
750
749
|
|
751
750
|
# This may not exist in docker so just skip the whole thing
|
752
751
|
if sut.file_exist?('/etc/ssh')
|
@@ -1004,7 +1003,7 @@ module Simp::BeakerHelpers
|
|
1004
1003
|
suts_network_info = {}
|
1005
1004
|
|
1006
1005
|
hosts.each do |host|
|
1007
|
-
fqdn = fact_on(host, 'fqdn').strip
|
1006
|
+
fqdn = fact_on(host, 'networking.fqdn').strip
|
1008
1007
|
|
1009
1008
|
host_entry = { fqdn => [] }
|
1010
1009
|
|
@@ -1090,7 +1089,7 @@ module Simp::BeakerHelpers
|
|
1090
1089
|
# public/fdqn.pub
|
1091
1090
|
# private/fdqn.pem
|
1092
1091
|
def copy_pki_to(sut, local_pki_dir, sut_base_dir = '/etc/pki/simp-testing')
|
1093
|
-
fqdn = fact_on(sut, 'fqdn')
|
1092
|
+
fqdn = fact_on(sut, 'networking.fqdn')
|
1094
1093
|
sut_pki_dir = File.join( sut_base_dir, 'pki' )
|
1095
1094
|
local_host_pki_tree = File.join(local_pki_dir,'pki','keydist',fqdn)
|
1096
1095
|
local_cacert = File.join(local_pki_dir,'pki','demoCA','cacert.pem')
|
@@ -1,19 +1,10 @@
|
|
1
1
|
---
|
2
2
|
HOSTS:
|
3
|
-
|
3
|
+
el9:
|
4
4
|
roles:
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
box: centos/7
|
9
|
-
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
10
|
-
family: centos-cloud/centos-7
|
11
|
-
gce_machine_type: n1-standard-2
|
12
|
-
el8:
|
13
|
-
roles:
|
14
|
-
- el8
|
15
|
-
platform: el-8-x86_64
|
16
|
-
box: generic/centos8s
|
5
|
+
- el9
|
6
|
+
platform: el-9-x86_64
|
7
|
+
box: generic/centos9s
|
17
8
|
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
18
9
|
family: centos-cloud/centos-stream-8
|
19
10
|
gce_machine_type: n1-standard-2
|
@@ -1,20 +1,12 @@
|
|
1
1
|
---
|
2
2
|
HOSTS:
|
3
|
-
|
3
|
+
el9.test.net:
|
4
4
|
roles:
|
5
5
|
- default
|
6
|
-
-
|
7
|
-
platform: el-
|
6
|
+
- el9
|
7
|
+
platform: el-9-x86_64
|
8
8
|
hypervisor: docker
|
9
|
-
image:
|
10
|
-
docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log"
|
11
|
-
|
12
|
-
el8.test.net:
|
13
|
-
roles:
|
14
|
-
- el8
|
15
|
-
platform: el-8-x86_64
|
16
|
-
hypervisor: docker
|
17
|
-
image: simpproject/simp_beaker_el8
|
9
|
+
image: quay.io/centos/centos:stream9
|
18
10
|
docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log"
|
19
11
|
|
20
12
|
CONFIG:
|
@@ -1,13 +1,5 @@
|
|
1
1
|
---
|
2
2
|
HOSTS:
|
3
|
-
oel7:
|
4
|
-
roles:
|
5
|
-
- default
|
6
|
-
- el7
|
7
|
-
platform: el-7-x86_64
|
8
|
-
box: generic/oracle7
|
9
|
-
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
10
|
-
|
11
3
|
oel8:
|
12
4
|
roles:
|
13
5
|
- el8
|
@@ -15,6 +7,14 @@ HOSTS:
|
|
15
7
|
box: generic/oracle8
|
16
8
|
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
17
9
|
|
10
|
+
oel9:
|
11
|
+
roles:
|
12
|
+
- default
|
13
|
+
- el9
|
14
|
+
platform: el-9-x86_64
|
15
|
+
box: generic/oracle9
|
16
|
+
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
|
17
|
+
|
18
18
|
CONFIG:
|
19
19
|
log_level: verbose
|
20
20
|
type: aio
|
@@ -2,7 +2,7 @@ require 'spec_helper_acceptance'
|
|
2
2
|
|
3
3
|
hosts.each do |host|
|
4
4
|
expect_failures = false
|
5
|
-
if hosts_with_role(hosts, '
|
5
|
+
if hosts_with_role(hosts, 'el9').include?(host)
|
6
6
|
expect_failures = true
|
7
7
|
end
|
8
8
|
|
@@ -12,7 +12,15 @@ hosts.each do |host|
|
|
12
12
|
end
|
13
13
|
|
14
14
|
context 'default settings' do
|
15
|
-
before(:all)
|
15
|
+
before(:all) do
|
16
|
+
install_simp_repos(host)
|
17
|
+
rescue => e
|
18
|
+
if expect_failures
|
19
|
+
warn e.message
|
20
|
+
else
|
21
|
+
raise e
|
22
|
+
end
|
23
|
+
end
|
16
24
|
|
17
25
|
it 'enables the correct repos' do
|
18
26
|
skip "#{host} is not supported yet" if expect_failures
|
@@ -34,7 +42,15 @@ hosts.each do |host|
|
|
34
42
|
end
|
35
43
|
|
36
44
|
context 'when passed a disabled list ' do
|
37
|
-
before(:all)
|
45
|
+
before(:all) do
|
46
|
+
install_simp_repos(host, ['simp-community-simp'] )
|
47
|
+
rescue => e
|
48
|
+
if expect_failures
|
49
|
+
warn e.message
|
50
|
+
else
|
51
|
+
raise e
|
52
|
+
end
|
53
|
+
end
|
38
54
|
|
39
55
|
it 'enables the correct repos' do
|
40
56
|
skip "#{host} is not supported yet" if expect_failures
|
@@ -14,7 +14,7 @@ describe 'Inspec STIG Profile' do
|
|
14
14
|
profile_path = File.join(
|
15
15
|
fixtures_path,
|
16
16
|
'inspec_profiles',
|
17
|
-
"#{fact_on(host, '
|
17
|
+
"#{fact_on(host, 'os.name')}-#{fact_on(host, 'os.release.major')}-#{profile}"
|
18
18
|
)
|
19
19
|
|
20
20
|
unless File.exist?(profile_path)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simp-beaker-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.34.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Tessmer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|