-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkitchen.docker.yml
64 lines (58 loc) · 2.08 KB
/
kitchen.docker.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
---
driver:
name: docker
use_sudo: false
privileged: true
transport:
name: docker
provisioner:
name: ansible_playbook
hosts: all
require_ansible_repo: false
require_ansible_omnibus: true
require_chef_for_busser: false
require_ruby_for_busser: false
ansible_verbose: true
roles_path: spec/ansible/mongodb-hardening
galaxy_ignore_certs: true
verifier:
name: inspec
sudo: true
load_plugins: true
inspec_tests:
- path: ./
input_files:
- inputs.yml
platforms:
- name: mongodb-enterprise-3.6
driver_config:
image: mongo:3.6
platform: ubuntu
run_command: /sbin/init
provision_command:
- sudo apt-get --yes --force-yes purge mongodb-org*
- sudo rm -r /var/log/mongodb
- echo "deb [ arch=amd64,arm64 trusted=yes ] http://repo.mongodb.com/apt/ubuntu xenial/mongodb-enterprise/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
- sudo apt-get update
- sudo apt-get install -y apt-utils python python-pip mongodb-enterprise=3.6.9 mongodb-enterprise-server=3.6.9 mongodb-enterprise-shell=3.6.9 mongodb-enterprise-mongos=3.6.9 mongodb-enterprise-tools=3.6.9
- echo "mongodb-enterprise hold" | sudo dpkg --set-selections
- echo "mongodb-enterprise-server hold" | sudo dpkg --set-selections
- echo "mongodb-enterprise-shell hold" | sudo dpkg --set-selections
- echo "mongodb-enterprise-mongos hold" | sudo dpkg --set-selections
- echo "mongodb-enterprise-tools hold" | sudo dpkg --set-selections
- pip install pymongo
suites:
- name: hardened
provisioner:
playbook: spec/ansible/mongodb-hardening/hardening-playbook.yml
verifier:
reporter:
- cli
- json:spec/results/hardened-test-result.json
- name: vanilla
provisioner:
playbook: spec/ansible/mongodb-hardening/vanilla-playbook.yml
verifier:
reporter:
- cli
- json:spec/results/vanilla-test-result.json