General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
5
Generate Ansible-compatible YAML inventory from VMware vROps (Aria Operations).
Sign in to like and favorite skills
Generate Ansible-compatible YAML inventory from VMware vROps (Aria Operations).
# Clone the repository git clone https://gitlab.com/your-username/vrops-inventory-claude.git cd vrops-inventory-claude # Create virtual environment python3 -m venv .venv source .venv/bin/activate # Install the package pip install -e . # Or install dependencies only pip install -r requirements.txt
Copy
.env.example to .env and configure:
cp .env.example .env # Edit .env with your vROps credentials
Environment variables:
| Variable | Description | Default |
|---|---|---|
| vROps hostname or IP | (required) |
| vROps API port | |
| Verify SSL certificates | |
| vROps username | (required if no token) |
| vROps password | (required if no token) |
| Auth source (local, vcenter) | |
| API token (overrides user/pass) | (optional) |
| Output file path | |
Copy
config/config.yaml.example to config/config.yaml and configure:
cp config/config.yaml.example config/config.yaml # Edit config/config.yaml with your settings
# Using environment variables vrops-inventory generate # Using config file vrops-inventory generate -c config/config.yaml # Custom output path vrops-inventory generate -o my-inventory.yaml # With verbose output vrops-inventory generate -v # Enrich with additional properties (slower) vrops-inventory generate --enrich
# List all resources vrops-inventory list # List specific resource types vrops-inventory list --type clusters vrops-inventory list --type edges vrops-inventory list --type managers
python -m vrops_inventory generate -v
The generated inventory follows Ansible YAML inventory format:
all: children: vsphere_clusters: hosts: cluster_01: vrops_resource_id: "abc123" vrops_resource_kind: "ClusterComputeResource" vrops_display_name: "Cluster-01" vrops_status: "POWERED_ON" nsx_edge_nodes: hosts: edge_01: vrops_resource_id: "def456" vrops_resource_kind: "NSXTEdge" vrops_display_name: "Edge-01" nsx_managers: hosts: nsx_mgr_01: vrops_resource_id: "ghi789" vrops_resource_kind: "NSXTManager" vrops_display_name: "NSX-Mgr-01"
# Test the inventory ansible-inventory -i inventory.yaml --list # Run a playbook ansible-playbook -i inventory.yaml playbook.yaml
# Install dev dependencies pip install -e ".[dev]" # Run linting ruff check src/ # Run type checking mypy src/ # Run tests pytest
MIT