-
Notifications
You must be signed in to change notification settings - Fork 7
/
.kitchen.yml
501 lines (496 loc) · 14.7 KB
/
.kitchen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
#
# Cookbook:: sys
# Config file for test-kitchen
#
# Copyright:: 2015-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Christopher Huhn <[email protected]>
# Dennis Klein <[email protected]>
# Matthias Pausch <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
driver:
name: vagrant
box_auto_update: true
customize:
memory: 1024
cpus: 2
provisioner:
require_chef_omnibus: false
install_strategy: skip
log_level: warn
# name: chef-solo
# chef_solo_path: /usr/bin/chef-solo
name: chef_zero
chef_client_path: /usr/bin/chef-client
data_bags_path: test/integration/data_bags
# product_name: cinc
chef_omnibus_url: https://omnitruck.cinc.sh/install.sh
verifier:
name: busser
ruby_bindir: /usr/bin
platforms:
- name: jessie
driver:
box: debian/jessie64
require_chef_omnibus: 12.0.3
provider: libvirt
provision: true
vagrantfiles:
- vagrant.rb
- name: stretch
driver:
box: gsi/stretch
box_url: https://web-docs.gsi.de/~christo/vagrant-boxes/gsi-stretch.json
provider: libvirt
provision: true
vagrantfiles:
- vagrant.rb
- name: buster
driver:
box: gsi/buster
box_url: https://web-docs.gsi.de/~christo/vagrant-boxes/gsi-buster.json
provider: libvirt
provision: true
vagrantfiles:
- vagrant.rb
- name: bullseye
driver:
box: debian/bullseye64
provider: libvirt
provision: true
require_chef_omnibus: true
vagrantfiles:
- vagrant.rb
provisioner:
client_rb:
# Chef 15 no longer collects passwd information by default
# cf. https://stackoverflow.com/a/70749387/9793012
'ohai.optional_plugins = ':
- :Passwd
- name: bookworm
driver:
box: debian/bookworm64
provider: libvirt
provision: true
require_chef_omnibus: true
vagrantfiles:
- vagrant.rb
provisioner:
client_rb:
# Chef 15 no longer collects passwd information by default
# cf. https://stackoverflow.com/a/70749387/9793012
'ohai.optional_plugins = ':
- :Passwd
- name: trixie
driver:
box: debian/testing64
provider: libvirt
provision: true
require_chef_omnibus: true
vagrantfiles:
- vagrant.rb
provisioner:
client_rb:
# Chef 15 no longer collects passwd information by default
# cf. https://stackoverflow.com/a/70749387/9793012
'ohai.optional_plugins = ':
- :Passwd
- name: focal
driver:
box: generic/ubuntu2004
provider: libvirt
provision: true
vagrantfiles:
- vagrant.rb
provisioner:
client_rb:
# Chef 15 no longer collects passwd information by default
# cf. https://stackoverflow.com/a/70749387/9793012
'ohai.optional_plugins = ':
- :Passwd
# the Jammy libvirt image is broken - at least on my box
# - name: jammy
# driver:
# box: generic/ubuntu2204
# provider: libvirt
# provision: true
# vagrantfiles:
# - vagrant.rb
# provisioner:
# client_rb:
# # Chef 15 no longer collects passwd information by default
# # cf. https://stackoverflow.com/a/70749387/9793012
# 'ohai.optional_plugins = ':
# - :Passwd
suites:
- name: sys_accounts
run_list:
- recipe[sys::accounts]
attributes:
sys:
accounts:
homer: # empty
bart: # databag
lisa:
home: /home/lisa
gid: simpsons
root:
# existing account, password should be changed,
# otherwise left untouched
password: "$6$aycaramba$ql7zzi/ASEyEA.MsG5/7I6njGIfXoOn.JJjbToCLfadhYa9axBSJ.bWJiALYy3vA1FnzPx.ycq0uCXqOFrgW6/"
groups:
simpsons:
- name: sys_apt
run_list:
- recipe[sys::ohai] # for 'debian' ohai plugin
- recipe[sys::apt]
attributes:
sys:
apt:
config:
51languages:
Acquire::Languages: none
keys:
add:
- "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmI0EYhjlUAEEALEhqsecNZOQMYQncDh5htEPu4/nxga6vPovMsmy9viByGwOMhjk\nDSQ7KCykaF/qD3YCSRsxscEfK/S94QyAUI9TgLjW4pQ5Ru8tuHndOS7STAlN+g73\n1Um8XNkjcvGzVbnTC/GiZNvUaon7jmr5UQehrfrMsuDRAgkxTSiiI1DrABEBAAG0\nOlphcHBlcmdlY2sgKEVpbiBzY2h3aWVyaWdlcyBLaW5kKSA8emFwcGVyZ2Vja0Bl\neGFtcGxlLmNvbT6I0gQTAQoAPBYhBHRLnTKh+G0175mg0SWgrRZdPwfvBQJiGOVQ\nAhsDBQld/A8ABAsJCAcFFQoJCAsEFgIDAQIeAQIXgAAKCRAloK0WXT8H7zLKBACF\nJjyzBjjhzbCy25E0nQefGvPzxrsQOkjObESmt5mq7TBPRJlKyR1RRJxqtE/D/Hwa\nsn9APnFtacX1CYkpDDVLRJWkujfv4eX7Oa/HSrAHMvXLw8hsNXIZVawD/4PMKskC\nPJOHirykipjT4Hh0tES+YhM8jRlspvlh0FFAKGvIHw==\n=lA2v\n-----END PGP PUBLIC KEY BLOCK-----\n"
multiarch: true
packages:
- nyancat
preferences:
sid:
package: '*'
pin: release l=Debian,n=sid
priority: 333
repositories:
# broken on Ubuntu - needs repo key for sid too
sid: "deb http://ftp.debian.org/debian sid main"
- name: sys_autofs
run_list:
- recipe[sys::autofs]
- recipe[sys::file]
attributes:
sys:
autofs:
maps:
test:
# dummy entry to avoid nil value
foo: bar
file:
# create a bind mount autofs map for testing
/etc/auto.test:
content: tempo -fstype=bind :/tmp
notifies:
- reload
- service[autofs]
- name: sys_banner
run_list:
- recipe[sys::banner]
attributes:
sys:
banner:
header: 'Space: the final frontier.'
message:
- These are the voyages of the starship Enterprise.
- 'Its continuing mission: to explore strange new worlds.'
- To seek out new life and new civilizations.
service_properties:
- To boldly go where no one has gone before!
footer: Engage!
info: true
- name: sys_chef
run_list:
- recipe[sys::chef]
attributes:
sys:
admin_group: adm
chef:
server_url: http://localhost:4000
init_style: systemd-timer
driver:
customize:
memory: 1024 # increase memory for chef-zero install
vagrantfiles:
- vagrant.rb
- vagrant_buildenv.rb # required to install chef-zero gem
- name: sys_fail2ban
run_list:
- recipe[sys::fail2ban]
attributes:
sys:
fail2ban:
jail.local:
DEFAULT:
bantime: 1234
maxretry: '4'
findtime: 2468
# on Trixie ignoreself has to be turned off explicitely
# for ban testing to work:
ignoreself: false
logtarget: syslog
- name: sys_ferm
run_list:
- recipe[sys::ferm]
attributes:
sys:
ferm:
rules:
ip:
filter:
INPUT:
- 'policy ACCEPT;'
OUTPUT:
- 'policy ACCEPT;'
FORWARD:
- 'policy DROP;'
- name: sys_ldap
run_list:
- recipe[sys::ldap]
- name: sys_linuxlogo
run_list:
- recipe[sys::linuxlogo]
attributes:
sys:
linuxlogo: absolutely!
- name: sys_krb5
run_list:
- recipe[sys::krb5]
attributes:
sys:
krb5:
foo: bar
- name: sys_mail
run_list:
- recipe[sys::mail]
- recipe[mail-test::default]
attributes:
sys:
mail:
relay:
smtp.example.com
aliases:
array:
- '| /bin/true'
- /tmp/mail.test
nobody: [email protected]
message_size_limit: 1234567890
- name: sys_multipath
run_list:
- recipe[sys::multipath]
attributes:
sys:
multipath:
disable: false
regenerate_initramdisk: true
defaults:
verbosity: 5
- name: sys_nfs
run_list:
- recipe[sys::nfs]
attributes:
sys:
nfs:
gssd:
verbosity: 12
rpc-verbosity: 7
- name: sys_nftables
run_list:
- recipe[nftables-test::default]
- name: sys_nftablesempty
run_list:
- recipe[nftables-test::empty]
- name: sys_nsswitch
run_list:
- recipe[nsswitch-test::default]
# attributes:
# sys:
# nsswitch:
# foo: bar
# passwd: files
# netgroup: compat
- name: sys_ohai
run_list:
- recipe[sys::ohai]
driver:
vagrantfiles:
- vagrant.rb
- vagrant_buildenv.rb # required to install ohai gem
- name: sys_resolv
run_list:
- recipe[sys::resolv]
attributes:
sys:
resolv:
servers:
- 8.8.8.8
- 9.9.9.9
- 140.181.61.61 # in case the cloud DNS servers are not accessible
search:
- gsi.de
- fair-center.eu
domain:
example.com
options:
- rotate
- timeout:3
force: true
- name: sys_rsyslog
run_list:
- recipe[sys::rsyslog]
attributes:
rsyslog:
filter: '*.*'
protocol: 'tcp'
sys:
rsyslog:
loghosts:
test-tls:
tls: true
target: '192.168.144.120'
port: 55514
priority_filter: 'authpriv.*'
test-relp:
tls: true
target: '192.168.144.96'
type: 'omrelp'
no-tls:
target: '192.168.144.72'
- name: sys_snmp
run_list:
- recipe[sys::hosts]
- recipe[sys::snmp]
attributes:
sys:
hosts:
allow:
- "snmpd: 127.0.0.1"
snmp:
community: oz
sys_contact: Dorothy Gale
sys_location: Somewhere over the rainbow
log_level: alert
- name: sys_ssh
run_list:
- recipe[sys::accounts]
- recipe[sys::ssh]
attributes:
sys:
accounts:
mchammer:
home: /home/mchammer
ssh:
authorize:
mchammer:
keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID+UAVz/kz0W/kTg0FGenwvJKZxxuBfLOKfg+VaKq9hB
root:
keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKZ7mI0iEdW2GmHZv+0OknkPDkQaBowEDzfaal2A+eRR
config:
root:
'*':
AddKeysToAgent: ask
known_hosts:
git.gsi.de:
ssh-rsa: AAAAB3NzaC1yc2EAAAADAQABAAABAQCeDOfPabxvYr+HNlBfE4plYktECkYIDRE3ggxjPOSGIH1SEMp+eMvbm46/aGXRBtEcHDXNju+CS2P+RjiNVV7UWzbkrsi3uyjDoDwMRlJyhvPR79fS4nsxI04ztk0GrYYZRGoDj9LcVdXWHYN/Ru70K2U+G2bQ8l2otMYVKdnsIssd1MOBpISy7fursYmC31U/Bpn19nfn0sRpdL8WNrjmJukFTzaSAJQIzciF/uTkAw5qmmJXRsl7aXyk5S690SQx8Wj1Jk8+AM508zdeD/M6vnWXDQQWZPYi1IcB+GA+7mQr9ijo3qJ9dIT54iZUAWmZU1KGYh5PBD93OnuiFh3P
ecdsa-sha2-nistp256: AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHXJoiDuGO3tveTCbbQONo9mBCXohPlziqGJAMvW8BY/WRMTW+C4Thoc2L69JZtV/FHF7fGpJ/g81Ljrxm4Huk8=
ssh-ed25519: AAAAC3NzaC1lZDI1NTE5AAAAINftkQCmVICGs0rdcZ13OQhdaQMjrYhsFF1ACtNwMseR
github.com:
ecdsa-sha2-nistp256: AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
ssh-ed25519: AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
ssh-rsa: AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
ssh_config:
- '*.example.org':
SendEnv: TGIF
sshd:
config:
ClientAliveInterval: 4711
X11Forwarding: 'no'
- name: sys_ssl
run_list:
- recipe[sys::ssl]
attributes:
sys:
ssl:
certs:
- {} # will not find data bag item
- data_bag_item: www-linux.gsi.de
- data_bag_item: www-linux.gsi.de
file: '/etc/ssl/certs/www-linux.gsi.de_chain.pem'
include_chain: true
key_file: '/etc/ssl/private/www-linux.gsi.de_chain.key'
- data_bag_item: www-linux.gsi.de
file: '/etc/ssl/certs/www-linux.gsi.de_no_chain.pem'
key_file: '/etc/ssl/private/www-linux.gsi.de_no_chain.key'
- data_bag: other_certs
data_bag_item: alternativlos.org
file: /tmp/covfefe.pem
- data_bag: nonexistant_databag
- name: sys_sudo
run_list:
- recipe[sys::env]
- recipe[sys::sudo]
attributes:
sys:
env:
FFF: "SKOLSTREJK FÖR KLIMATET"
RESCUE: "THE PLANET"
sudo:
config:
cleanup: true
mailfrom: [email protected]
mailto: daemon
mailsub: "[SUDO] RED ALERT!"
kitchen:
defaults:
- user: SMUTJE
option: "env_keep += FFF"
users:
SMUTJE:
# for kitchen-docker:
- kitchen
# for kitchen-vagrant:
- vagrant
# for env_keep test:
- root
rules:
- "SMUTJE ALL=(ALL) NOPASSWD: ALL"
- name: sys_systemd
run_list:
- recipe[sys::systemd]
attributes:
sys:
systemd:
unit:
unknown_method:
whatever: "Should throw an error but converge"
journald:
Storage: volatile
RuntimeMaxUse: 128M
- name: sys_time
run_list:
- recipe[sys::time]
attributes:
sys:
time:
zone: Antarctica/Troll
servers:
- ntp1.net.berkeley.edu
- time1.esa.int
- zeit.fu-berlin.de
- name: sys_x509
run_list:
- recipe[x509-test::default]