packer-provisioner-inspec
packer-provisioner-inspec copied to clipboard
Add support for providing a list of 'valid exit codes' for the Inspec
Inspec can exit with a non-zero exit code but still pass...
If all tests passed (no fails, no skips) exit code 0 is returned. If some tests skipped but none failed, exit code 101 is returned. If at least one test failed, exit code 100 is returned. If inspec failed for any other reason, exit code 1 is returned.
Source: https://www.inspec.io/docs/reference/cli/#exec
Yep, InSpec also provides the --no-distinct-exit
to simply return 0 or 1 on test success and failure instead of the additional error codes. Might need to add a note about this to the README to avoid further issues (ie. #6 )
Ah, I totally missed that argument... ;)
Either option is valid I guess :)