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
  • Don't try to run the control file but run the profile itself, there's pretty good material to learn inspec on learn.chef.io
    – Tensibai
    Jul 3 '18 at 4:44
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.