4b240a5d74
If a NIC has no primary ipConfiguration, the 'primary' field returned by Azure is set to 'null' thus removed from the 'nic_model' ipConfigurations properties. Unfortunately the code generating the hostvars dict. assumes the 'primary' key always exists, leading the entire host parsing to fail. This patch changes the way the 'primary' field is accessed by using the dict. 'get' method with a default value set to 'False'. Resolves #63721 Testing Done: Run ansible-inventory with an azure_rm plugin that points to a resource group that contain a two VMs, on with a primary ipConfiguration and another one without. Check that without the patch the inventory output does not contain the VMs (or just the one with the primary ipConfiguration set, depending on the VM names). Finally check that with the patched azure_rm.py file, both VMs show up. |
||
---|---|---|
.. | ||
ansible |