General
PromptBeginner5 minmarkdown
<h1 align="center">
<a href="https://prompts.chat">
120
Generate Ansible-compatible YAML inventory from VMware vROps (Aria Operations).
Loading actions...
<a href="https://prompts.chat">
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend linting, type safety, or ESLint configuration.
risks
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_HOST | vROps hostname or IP | (required) |
VROPS_PORT | vROps API port | 443 |
VROPS_VERIFY_SSL | Verify SSL certificates | false |
VROPS_USERNAME | vROps username | (required if no token) |
VROPS_PASSWORD | vROps password | (required if no token) |
VROPS_AUTH_SOURCE | Auth source (local, vcenter) | local |
VROPS_API_TOKEN | API token (overrides user/pass) | (optional) |
INVENTORY_OUTPUT_PATH | Output file path | inventory.yaml |
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