Compliance testing with InSpec

Verifying that servers and applications you install are configured correctly and fulfill all compliance requirements by hand is tedious and error-prone. Chef comes with InSpec, a human-readable language for compliance auditing and testing your infrastructure. With InSpec, you can write automated tests to verify a host of criteria on your servers: from the contents of certain files to applications running on certain ports, you can make sure that your servers and applications are configured correctly.

Getting ready

Make sure you have ChefDK installed, as described in the Installing the Chef Development Kit on your workstation recipe in Chapter 1, Chef Infrastructure.

How to do it…

Let's create a very simple compliance ...

Get Chef Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.