ansible_modules
ansible_modules copied to clipboard
Add cluster host to the plugins response
Related Issue
N/A
New Behavior
Adds the GUI information Cluster -> Device to the plugin's response. See output of ansible-inventory:
"cluster_device": {
"display": "proxmox-host-01",
"id": 01,
"name": "proxmox-host-01",
"url": "https://net.box/api/dcim/devices/01/"
},
Contrast to Current Behavior
So far, the inventory plugin does not return any information about the "Device" a VM is assigned to. Only the cluster name or type are available.
Discussion: Benefits and Drawbacks
This change allows defining a Device/Host a VM should run on. Sometimes specific VMs must run on a specific host. Ansible may pick up that information, for example creating the VM on that host. In general, if that information is available in the UI, it will be beneficial to have it returned to Ansible as well. Tested in NetBox 3.6.
Changes to the Documentation
Since this is not supposed to be a group_by parameter, no changes are required.
Proposed Release Note Entry
Add the cluster.device information to the plugin response.
Double Check
- [x] I have read the comments and followed the CONTRIBUTING.md.
- [x] I have explained my PR according to the information in the comments or in a linked issue.
- [x] My PR targets the
develbranch.