-
Notifications
You must be signed in to change notification settings - Fork 8
/
kitchen.ec2.yml
62 lines (58 loc) · 1.45 KB
/
kitchen.ec2.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
---
driver:
name: ec2
associate_public_ip: true
instance_type: c5.large
ebs_optimized: true
block_device_mappings:
- device_name: /dev/sda1
ebs:
delete_on_termination: true
volume_size: 30
volume_type: gp2
interface: public
require_chef_for_busser: false
privileged: true
provisioner:
name: ansible_playbook
hosts: all
require_ansible_repo: true
require_chef_for_busser: false
require_ruby_for_busser: false
ansible_verbose: true
galaxy_ignore_certs: true
roles_path: ./spec/ansible/nginx-hardening
requirements_path: ./spec/ansible/nginx-hardening/requirements.yml
additional_copy_path:
- spec/ansible/nginx-hardening/vars
extra_vars_file: /tmp/kitchen/vars/ec2.vars.yml
transport:
name: ssh
verifier:
name: inspec
sudo: true
load_plugins: true
inspec_tests:
- path: .
platforms:
- name: ubuntu-18.04
lifecycle:
pre_converge:
- remote: sudo apt-get -y update
- remote: sudo apt-get -y install nginx
- remote: sudo systemctl start nginx
suites:
- name: hardened
provisioner:
playbook: ./spec/ansible/nginx-hardening/hardening-playbook.yml
verifier:
reporter:
- cli
- json:spec/results/hardened-test-result.json
- name: vanilla
provisioner:
playbook: ./spec/ansible/nginx-hardening/vanilla-playbook.yml
verifier:
reporter:
- cli
- json:spec/results/vanilla-test-result.json