Quick Reference
Installation
# PyPI (recommended)
pip install ansible-inspec
# Docker
docker pull htunnthuthu/ansible-inspec:latest
# Verify installation
ansible-inspec --versionCommon Commands
Execute InSpec Profiles
# Local system
ansible-inspec exec profile/ --target local://
# Remote host
ansible-inspec exec profile/ --target user@hostname
# Ansible inventory
ansible-inspec exec profile/ --target inventory.yml
# Docker container
ansible-inspec exec profile/ --target docker://container_nameGenerate Reports
Convert Profiles
Chef Supermarket
Python API
Docker Usage
Common Workflows
Workflow 1: Download and Run CIS Benchmark
Workflow 2: Convert Profile to Ansible Collection
Workflow 3: CI/CD Integration
Workflow 4: Multi-Host Compliance Scan
Report Formats
JSON (InSpec Schema)
HTML (Interactive)
JUnit XML
Filtering Controls
Environment Variables
Common Issues
InSpec Not Found
Permission Denied
Connection Timeout
Tips and Tricks
Dry Run
Verbose Output
Background Execution
Auto-Reporting with Collections
Resources
License
Last updated