Current Version: v4.18.2 | Released: | Download
Generated from Cribl API Spec 4.18.2
Auto-generate all Ansible modules from Cribl's OpenAPI specification:
# Generate all modules (imperative + declarative)
python scripts/generate_modules.py --declarative
# Clean and regenerate
python scripts/generate_modules.py --clean
# Specific collection only
python scripts/generate_modules.py --product core
# Use custom OpenAPI spec
python scripts/generate_modules.py --spec path/to/cribl-api.ymlFeatures:
- Automatic parameter extraction from OpenAPI schemas
- Smart categorization (routes to correct product collection)
- Documentation generation (DOCUMENTATION, EXAMPLES, RETURN blocks)
- Type conversion (OpenAPI types β Ansible types)
- Built-in error handling and authentication
Documentation: See docs/GENERATOR.md for advanced usage.
# Development (self-signed certs)
validate_certs: false
# Production (valid certs)
validate_certs: true# Create encrypted vault
ansible-vault create vault.yml
# Add your credentials
cribl_username: admin
cribl_password: your-secure-password
cribl_token: your-api-token
# Use in playbooks
ansible-playbook playbook.yml -e @vault.yml --ask-vault-passvars:
cribl_url: "{{ lookup('env', 'CRIBL_URL') }}"
cribl_token: "{{ lookup('env', 'CRIBL_TOKEN') }}"- Auto-Generation Guide - How automatic CRUD detection works
- Declarative Modules Guide - Complete guide to state-based management
- Testing Guide - Docker tests, unit tests, integration tests
- Generator Guide - Module generation and customization
- API Reference - All modules and parameters
- Examples - Real-world playbook examples
- Contributing - How to contribute
.
βββ scripts/
β βββ generate_modules.py # CLI entry point
β βββ generator/ # Modular generator
β βββ openapi_parser.py # Parse OpenAPI specs
β βββ module_generator.py # Generate imperative modules
β βββ declarative_generator.py # Generate declarative modules
β βββ collection_manager.py # Manage collection structure
β βββ templates.py # Code templates
βββ schemas/
β βββ cribl-apidocs-4.15.0.yml # OpenAPI specification
βββ build/
β βββ ansible_collections/cribl/ # Generated collections
β βββ core/ # 276 modules
β βββ stream/ # 127 modules
β βββ edge/ # 19 modules
β βββ search/ # 80 modules
β βββ lake/ # 11 modules
βββ docs/ # Documentation
βββ tests/ # Test suite
β βββ docker/ # Docker integration tests
β βββ unit/ # Unit tests
β βββ integration/ # Integration tests
βββ Makefile # Development commands
βββ README.md # This file
- Python: 3.6 or higher
- Ansible: 2.9 or higher
- PyYAML: For OpenAPI parsing
- Docker: For integration tests (optional)
- Cribl Instance: Stream, Edge, Search, or Lake
Contributions welcome! Please see CONTRIBUTING.md for:
- Code style guidelines
- Testing requirements
- Pull request process
- Development setup
- Documentation: Cribl Docs
- API Reference: Cribl API
- Issues: GitHub Issues
- Cribl Community: Slack
This project is licensed under the MIT License - see the LICENSE file for details.
- 513 imperative modules (all Cribl API endpoints)
- Automatic CRUD detection and declarative module generation
- 49 auto-generated declarative modules across all collections
- Auto-generated unit tests and integration playbooks
- Docker integration testing
- Check mode and diff support
- Cribl Cloud Support
- Smart declarative functions targeting worker groups
- Built for the Cribl Community
- Uses Cribl's OpenAPI Specification
- Inspired by Infrastructure as Code best practices