simp-beaker-helpers 1.33.0 → 1.34.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -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 +5 -5
- 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: 1f134126c3a1b23c87a495aac126cd172bc1f261d9da6bcf5f488af22cbdade7
|
4
|
+
data.tar.gz: 7a24de4dff9da4288b91995e6af7d5be0e58505116c1661e588d51cfcc5bfc0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69ce9cb283b5df89a141c540df080c670505bd9d1f65db91fdb53b96171e4a66e642f6d3850d26cb4939a3d04271f6766062d45610873f0b9a55a0c6913e0725
|
7
|
+
data.tar.gz: 74f9426f0356d2b97ef1c7dbcb8eb568b200cdfbeaaa2c0581e87ac1118a7ad2cf0e8060f3a3c5a91d9f73bec963d0d1c570962f475507a6b1ddeb0cfeefdf29
|
data/CHANGELOG.md
CHANGED
@@ -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,8 +723,8 @@ 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').strip
|
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
729
|
if current_domain.empty?
|
730
730
|
new_fqdn = hostname + '.beaker.test'
|
@@ -744,7 +744,7 @@ module Simp::BeakerHelpers
|
|
744
744
|
end
|
745
745
|
end
|
746
746
|
|
747
|
-
if fact_on(sut, 'domain').strip.empty?
|
747
|
+
if fact_on(sut, 'networking.domain').strip.empty?
|
748
748
|
fail("Error: hosts must have an FQDN, got domain='#{current_domain}'")
|
749
749
|
end
|
750
750
|
|
@@ -1004,7 +1004,7 @@ module Simp::BeakerHelpers
|
|
1004
1004
|
suts_network_info = {}
|
1005
1005
|
|
1006
1006
|
hosts.each do |host|
|
1007
|
-
fqdn = fact_on(host, 'fqdn').strip
|
1007
|
+
fqdn = fact_on(host, 'networking.fqdn').strip
|
1008
1008
|
|
1009
1009
|
host_entry = { fqdn => [] }
|
1010
1010
|
|
@@ -1090,7 +1090,7 @@ module Simp::BeakerHelpers
|
|
1090
1090
|
# public/fdqn.pub
|
1091
1091
|
# private/fdqn.pem
|
1092
1092
|
def copy_pki_to(sut, local_pki_dir, sut_base_dir = '/etc/pki/simp-testing')
|
1093
|
-
fqdn = fact_on(sut, 'fqdn')
|
1093
|
+
fqdn = fact_on(sut, 'networking.fqdn')
|
1094
1094
|
sut_pki_dir = File.join( sut_base_dir, 'pki' )
|
1095
1095
|
local_host_pki_tree = File.join(local_pki_dir,'pki','keydist',fqdn)
|
1096
1096
|
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.0
|
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-09-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: beaker
|