2

This blog post describes wrapper profiles in detail:

https://blog.chef.io/2017/07/06/understanding-inspec-profile-inheritance/

At the very end of the post, it references a Git repo that contains an example of using a wrapper profile:

https://github.com/adamleff/inspec-profile-wrapper-example

When I clone the repo, cd to the controls folder, and attempt to run these tests:

inspec exec controls_from_other_profiles.rb

I get the following error message:

Cannot load linux-baseline since it is not listed as a dependency of tests from controls_from_other_profiles.rb.

Dependencies available from this context are:

The dependencies are defined in inspec.yml.

How do I correctly run these tests?

1 Answers1

2

I stumbled across the answer. From within the profile directory, run this command:

inspec exec .

Don't forget to set the depends key in inspec.yml.