[Feature]: Add vm assigned device to inventory vars
NetBox version
v3.3.5
Feature type
Change to existing Module
Proposed functionality
In the inventory variables related to a virtual machine should be present the assigned device
According to the web interface restrictions I suppose the right var name is cluster_device
For esample vm1 in the demo site is assigned to a specific device so ansible-inventory --host vm1 should return:
{ "cluster": "DO-AMS3", "cluster_device": "NCblade[0-3]" "cluster_group": "emea", "cluster_type": "digitalocean", "custom_fields": {}, "device_roles": [ "application-server" ], "is_virtual": true, "local_context_data": [ null ], "locations": [], "platforms": [ "ubuntu-linux-20-04" ], "regions": [], "services": [], "site_groups": [], "status": { "label": "Active", "value": "active" }, "tags": [] }
Use case
use the assigned device directly in the ansible playbooks
External dependencies
No response
Nice enhancement request, is anyone out there working on this?