azure
azure copied to clipboard
Added possibility to assign RG name via env var ANSIBLE_AZURE_VMSS_RESOURCE_GROUPS for VMSS and Fix inventory fail when trying to parse instance from the flexible scale set
SUMMARY
Added possibility to assign RG name via env var ANSIBLE_AZURE_VMSS_RESOURCE_GROUPS for VMSS closes https://github.com/ansible-collections/azure/issues/1432
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
azure_rm
SUMMARY
Fix inventory failure when trying to parse instances from the flexible scale set closes https://github.com/ansible-collections/azure/issues/1431
ISSUE TYPE
- Bug Fix
COMPONENT NAME
azure_rm
@Justwmz According to the return range, should we return VMSS instances and filter VMSS instances in VMS? right?
@Fred-sun We can do that, but there will be another problem. If you supply the name of the rg for the include_vm_resource_groups and include_vmss_resource_groups to the same value. It will cause a double fetch of instances within a scale set because they are regular VMS. After all, they are a part of both types...
We can add a check when we fetch vms if it is a part of the scale set, but you need to perform an API call to Azure to see from the response if this property is present or not. Which will anyway cause a double API call.
So in our case, better to completely filter out flexible parents, and let inventory fetch flexible instances using --> include_vm_resource_groups.
This solves a problem with double API calls for the same instances and from the performance side it will be better.
@Justwmz Your idea is really acceptable, but we still need to discuss it, thank you!
Hi @Fred-sun, Is there any news regarding this issue? Any decisions being made?
@Justwmz There is a conflict, please fix it. Thank you!