Here are the steps to create, upload, and run a custom InSpec profile via Chef Automate.
- (Optional) Have the ChefDK installed, or InSpec installed.
- Create a skeleton profile:
inspec init profile <name>
- Edit the
<name>/inspec.yml with everything you might need, including any dependencies.
- Add a control to
<name>/controls/example.rb. (You probably want to change this file name.)
- Verify the controls after you are done:
inspec check <name>.
- (Optional) Run the profile locally:
inspec exec <name>.
- Login to the Chef Automate instance via InSpec:
inspec compliance login.
- Upload the profile to Automate:
inspec compliance upload <name>.
- Verify the profile is uploaded correctly:
inspec compliance profiles.
- Run the profile via Automate:
inspec compliance exec YOURUSERNAME/<name>.