Skip to content

Commit 74a387b

Browse files
committed
add dokken and vagrant kitchen files as well as update OS's
Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
1 parent c898b64 commit 74a387b

6 files changed

Lines changed: 197 additions & 54 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Gemfile.lock
22
inspec.lock
3+
.kitchen

.kitchen.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

kitchen.dokken.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
driver:
3+
name: dokken
4+
privileged: true # because Docker and SystemD/Upstart
5+
6+
transport:
7+
name: dokken
8+
9+
provisioner:
10+
name: chef_infra
11+
deprecations_as_errors: true
12+
chef_license: accept-no-persist
13+
clean_dokken_sandbox: false
14+
15+
verifier:
16+
name: inspec
17+
sudo: true
18+
19+
platforms:
20+
- name: almalinux-8
21+
driver:
22+
image: dokken/almalinux-8
23+
pid_one_command: /usr/lib/systemd/systemd
24+
25+
- name: almalinux-9
26+
driver:
27+
image: dokken/almalinux-9
28+
pid_one_command: /usr/lib/systemd/systemd
29+
30+
- name: amazonlinux-2
31+
driver:
32+
image: dokken/amazonlinux-2
33+
pid_one_command: /usr/lib/systemd/systemd
34+
35+
- name: amazonlinux-2022
36+
driver:
37+
image: dokken/amazonlinux-2022
38+
pid_one_command: /usr/lib/systemd/systemd
39+
40+
- name: centos-7
41+
driver:
42+
image: dokken/centos-7
43+
pid_one_command: /usr/lib/systemd/systemd
44+
45+
- name: centos-8
46+
driver:
47+
image: dokken/centos-8
48+
pid_one_command: /usr/lib/systemd/systemd
49+
50+
- name: debian-10
51+
driver:
52+
image: dokken/debian-10
53+
pid_one_command: /bin/systemd
54+
intermediate_instructions:
55+
- RUN /usr/bin/apt-get update
56+
57+
- name: debian-11
58+
driver:
59+
image: dokken/debian-10
60+
pid_one_command: /bin/systemd
61+
intermediate_instructions:
62+
- RUN /usr/bin/apt-get update
63+
64+
- name: ubuntu-20.04
65+
driver:
66+
image: dokken/ubuntu-20.04
67+
pid_one_command: /bin/systemd
68+
intermediate_instructions:
69+
- RUN /usr/bin/apt-get update
70+
71+
- name: ubuntu-22.04
72+
driver:
73+
image: dokken/ubuntu-22.04
74+
pid_one_command: /bin/systemd
75+
intermediate_instructions:
76+
- RUN /usr/bin/apt-get update
77+
78+
suites:
79+
- name: default
80+
verifier:
81+
inspec_tests:
82+
- path: .

kitchen.vagrant.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
driver:
3+
name: vagrant
4+
box_auto_update: true
5+
box_auto_prune: true
6+
7+
provisioner:
8+
name: chef_infra
9+
retry_on_exit_code:
10+
- 35 # 35 is the exit code signaling that the node is rebooting
11+
product_name: chef
12+
always_update_cookbooks: true
13+
deprecations_as_errors: true
14+
chef_license: accept-no-persist
15+
16+
verifier:
17+
name: inspec
18+
19+
platforms:
20+
- name: almalinux-8
21+
- name: almalinux-9
22+
- name: amazonlinux-2
23+
# - name: amazonlinux-2022
24+
- name: centos-7
25+
- name: centos-8
26+
- name: debian-10
27+
- name: debian-11
28+
- name: ubuntu-20.04
29+
- name: ubuntu-22.04
30+
- name: windows-10
31+
driver:
32+
box: stromweld/windows-10
33+
- name: windows-11
34+
driver:
35+
box: stromweld/windows-11
36+
- name: windows-2012r2
37+
driver:
38+
box: stromweld/windows-2012r2
39+
- name: windows-2016
40+
driver:
41+
box: stromweld/windows-2016
42+
- name: windows-2019
43+
driver:
44+
box: stromweld/windows-2019
45+
- name: windows-2022
46+
driver:
47+
box: stromweld/windows-2022
48+
49+
suites:
50+
- name: default
51+
verifier:
52+
inspec_tests:
53+
- path: .

kitchen.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
driver:
3+
name: docker
4+
use_sudo: false
5+
6+
provisioner:
7+
name: chef_infra
8+
9+
verifier:
10+
name: inspec
11+
sudo: true
12+
13+
platforms:
14+
- name: ubuntu-16.04
15+
driver:
16+
image: ubuntu:16.04
17+
- name: ubuntu-18.04
18+
driver:
19+
image: ubuntu:18.04
20+
- name: ubuntu-20.04
21+
driver:
22+
image: ubuntu:20.04
23+
- name: ubuntu-22.04
24+
driver:
25+
image: ubuntu:22.04
26+
- name: centos-6
27+
driver:
28+
image: centos:6
29+
- name: centos-7
30+
driver:
31+
image: centos:7
32+
- name: centos-8
33+
driver:
34+
image: centos:8
35+
- name: almalinux-8
36+
driver:
37+
image: almalinux:8
38+
privileged: true
39+
- name: almalinux-9
40+
driver:
41+
image: almalinux:9
42+
privileged: true
43+
- name: debian-8
44+
driver:
45+
image: debian:8
46+
- name: debian-9
47+
driver:
48+
image: debian:9
49+
- name: debian-10
50+
driver:
51+
image: debian:10
52+
- name: debian-11
53+
driver:
54+
image: debian:11
55+
56+
suites:
57+
- name: default
58+
verifier:
59+
inspec_tests:
60+
- path: .

libraries/linux_updates.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def packages
208208
end
209209

210210
def updates
211-
rhel_updates = if os.release.to_i > 7
211+
rhel_updates = if @inspec.os.release.to_i > 7
212212
<<~PRINT_JSON
213213
#!/usr/bin/sh
214214
/usr/libexec/platform-python -c 'import dnf; base = dnf.Base(); base.read_all_repos(); base.fill_sack(); q = base.sack.query(); list = list(q.upgrades()); res = ["{\\"name\\":\\""+x.name+"\\",\\"version\\":\\""+x.version+"-"+x.release+"\\",\\"arch\\":\\""+x.arch+"\\",\\"repository\\":\\""+x.reponame+"\\"}" for x in list]; print("{\\"available\\":["+",".join(res)+"]}")'

0 commit comments

Comments
 (0)