Profile Conversion
Overview
Quick Start
# Convert an InSpec profile
ansible-inspec convert /path/to/inspec-profile \
--output-dir ./collections \
--namespace myorg \
--collection-name compliance_baseline
# Build and install the collection
cd collections/ansible_collections/myorg/compliance_baseline
ansible-galaxy collection build
ansible-galaxy collection install myorg-compliance_baseline-*.tar.gz
# Use the collection
ansible-playbook myorg.compliance_baseline.compliance_check -i inventory.ymlCommand Reference
Basic Usage
Options
Option
Description
Default
Examples
Convert DevSec Linux Baseline
Convert Custom Profile
Convert with Native Modules Only
Conversion Process
1. Profile Analysis
2. Resource Mapping
InSpec Resource
Ansible Module
Conversion Type
3. Collection Generation
Conversion Examples
Example 1: SSH Configuration
Example 2: Service Checks
Example 3: Package Checks
Custom Resources Support
How It Works
Example: Custom Resource
Requirements for Custom Resources
Using Converted Collections
Installation
Running Compliance Checks
Using Roles
Using Included Playbook
Selective Tag Execution
Best Practices
1. Profile Organization
2. Namespace Selection
3. Collection Naming
4. Version Control
5. Testing
Troubleshooting
Conversion Fails
Custom Resources Not Working
Role Tasks Not Generated
Ansible Module Not Found
Advanced Usage
Custom Collection Structure
Integration with CI/CD
Publishing to Galaxy
Resources
Support
License
Last updated