-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathkitchen.yml
114 lines (108 loc) · 3.22 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
---
driver:
name: docker
# Special config for enabling systemd init
default_driver_config: &default_driver_config
run_command: /sbin/init
cap_add:
- SYS_ADMIN
run_options:
env: container=docker
volume:
- /sys/fs/cgroup:/sys/fs/cgroup
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable sshd.service
transport:
# TODO: remove with better solution than workaround:
# https://github.com/test-kitchen/test-kitchen/issues/1035
max_ssh_sessions: 6
provisioner:
hosts: test-kitchen
name: ansible_playbook
require_pip: true
ansible_version: 2.9.9
ansible_verbose: true
ansible_cfg_path: test/ansible.cfg
idempotency_test: true
require_chef_for_busser: false
require_ruby_for_busser: false
verifier:
name: inspec
platforms:
- name: centos-7
driver_config:
<<: *default_driver_config
provision_command:
- yum -y install epel-release && yum makecache
- yum -y install python-pip
provisioner:
ansible_cfg_path: test/ansible-legacy.cfg
- name: fedora-32
driver_config:
<<: *default_driver_config
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable sshd.service
- yum -y install python-pip
- name: fedora-33
driver_config:
<<: *default_driver_config
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable sshd.service
- yum -y install python-pip
- name: ubuntu-16.04
driver_config:
<<: *default_driver_config
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable ssh.service
- name: ubuntu-18.04
driver_config:
<<: *default_driver_config
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable ssh.service
- name: ubuntu-20.04
driver_config:
<<: *default_driver_config
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable ssh.service
- name: debian-8
driver_config:
<<: *default_driver_config
run_command: /lib/systemd/systemd
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable ssh.service
provisioner:
ansible_cfg_path: test/ansible-legacy.cfg
- name: debian-9
driver_config:
<<: *default_driver_config
run_command: /lib/systemd/systemd
provision_command:
- sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
- systemctl enable ssh.service
suites:
- name: config_unit
provisioner:
playbook: test/integration/config/config_unit/default_playbook.yml
verifier:
inspec_tests:
- path: test/integration/config/config_unit
- name: launch_unit
provisioner:
playbook: test/integration/launch/default_playbook.yml
verifier:
inspec_tests:
- path: test/integration/launch
- name: uninstall
provisioner:
playbook: test/integration/uninstall/default_playbook.yml
idempotency_test: false
verifier:
inspec_tests:
- path: test/integration/uninstall