inspec/docs/plugin_kitchen_inspec.md

51 lines
1.3 KiB
Markdown
Raw Normal View History

2016-09-21 16:58:25 +00:00
---
title: About kitchen-inspec
---
# kitchen-inspec
Use InSpec as a Kitchen verifier with `kitchen-inspec`.
2016-09-21 16:58:25 +00:00
Add the InSpec verifier to the `.kitchen.yml` file:
2016-09-21 16:58:25 +00:00
verifier:
name: inspec
Use a compliance profile from the Chef Compliance server:
2016-09-21 16:58:25 +00:00
suites:
- name: compliance
run_list:
- recipe[ssh-hardening::default]
2016-09-21 16:58:25 +00:00
verifier:
inspec_tests:
- compliance://base/ssh
and then run the following command:
$ inspec compliance login https://compliance.test --user admin --insecure --token ''
where `--insecure` is required when using self-signed certificates.
Use a compliance profile from the Chef Supermarket:
2016-09-21 16:58:25 +00:00
suites:
- name: supermarket
run_list:
- recipe[ssh-hardening::default]
2016-09-21 16:58:25 +00:00
verifier:
inspec_tests:
- supermarket://dev-sec/ssh-baseline
Use InSpec tests from the local file system:
suites:
- name: local
run_list:
- recipe[my_cookbook::default]
verifier:
inspec_tests:
- test/integration/default
Check out [Detect and correct with Test Kitchen](https://learn.chef.io/modules/detect-correct-kitchen#/) on Learn Chef Rally for a hands-on look at how to use Test Kitchen to run InSpec profiles.