Closed theasianpianist closed 6 months ago
@theasianpianist Thank you very much for reporting this problem. First of all, I tested locally and could obtain inventory information. You returned nothing. Can you confirm that the resource group you want to obtain has a VM? Is the current network accessible through SSH? Thank you very much!
@Fred-sun I can confirm that the resource group in question contains VMs (as well as VMSS instances), and I am able to SSH to all VMs from the same machine I'm running Ansible on. I did observe some interesting behavior - the above bug only occurs if I attach data disks to the Virtual Machine Scale Set listed under include_vmss_resource_groups
in the inventory file. If I remove all data disks from the VMSS and then update all VM instances, then the dynamic inventory is able to be loaded properly.
@theasianpianist Got it. I'll look into it. Thank you very much!
@theasianpianist Could you please help to confirm whether there is any error in the resource group where your VMSS resides? The only way I can repeat the error is - the name of the resource group where VMSS resides is incorrect!
include_vmss_resource_groups:
- <The VMSS's resource group is not exist>
@Fred-sun from what I remember, the resource group was spelled correctly since I was able to get it working when I removed the data disks, it only produced the failure when I tried this operation with data disks attached to the VMSS.
@theasianpianist I'm not sure what you mean, whether you are adding the data disk to the VMSS or to the VM instance. I still can't repeat your question, thank you!
Please update your ansible-collections to lastest(v1.14.0).
ansible-galaxy collection install azure.azcollection --force
hi @Fred-sun I'm also facing this issue, not sure what resolution needs to be applied for this, can you please let me know on the same?
@theasianpianist @pranav-desai-bluejeans I'm sorry for replying you so late, because I have been unable to repeat this problem, and there is no way to provide the next step solution now! Thanks!
@theasianpianist In addition, The file name in your report issue is 'gemini_azure_rm.yaml', But you are executing 'ansible-inventori-i inv_azure_rm.yaml --graph' Is the problem you are reporting inconsistent with your playbook?
@theasianpianist Does your problem still exist? After repeated deliberation, I still can't figure out what this mistake is? Can you update to the latest version and try again? Thank you very much!
@Fred-sun unfortunately the infrastructure that I saw this problem on is no longer available, and I have no way to try to reproduce the problem anymore :( feel free to close this unless @pranav-desai-bluejeans is able to share reproduction steps?
@theasianpianist @pranav-desai-bluejeans Ok, I will close this question for the moment, if you have new questions, you are welcome to continue to submit. Thank you!
SUMMARY
Trying to use the dynamic inventory plugin fails with the following error:
ISSUE TYPE
COMPONENT NAME
azure.azcollection.azure_rm
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Host device:
Target VMs in Azure belong to a VMSS running Ubuntu Server 20.04 LTS
STEPS TO REPRODUCE
Contents of inv_azure_rm.yaml:
EXPECTED RESULTS
I expect the inventory graph to be printed succesfully
ACTUAL RESULTS