Inspec profile

Inspec profile allows to group the test under the one folder and it helps to share with others

A profile can have one or more test

Creating the profile

$ inspec init profile test-profile

Now execute the tree command on the test-profile to find out the files present in the directory

tree test-profile

test-profile/
├── controls
│   └── example.rb
├── inspec.yml
└── README.md

1 directory, 3 files

README.md - This file describes the profile that we gonna create

inspec.yml - This file tells about the meta-data of the profile

controls - this folder consists of the control that we want to execute

Execute the below command to check whether our profile was in correct format

$ inspec check <profile-name>

If you everything was right you will get the output with the following message

Location :   test-profile/
Profile :    test-profile
Controls :   2
Timestamp :  2020-05-30T11:03:39+05:30
Valid :      true

No errors or warnings

Now try to execute the profile by typing the below command

$ inspec exec <profile-name>

We can save the profile by the below command

$ inspec archive <profile-name> --zip

results matching ""

    No results matching ""