-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azure_rm_virtualmachine is throwing KeyError: 'os_profile' for some VMs #1274
Comments
This issue is reproducible for all VMs which is created using the snapshot of OS disk of another VM. JSON view of such VMs in Azure will look like below and there will not be any
The stop/start of same configuration VMs were working earlier, hence this issue is happening only for the recent version of |
We are able to use this module upto |
I am trying to generate a custom EE to be able to manage servers in Azure using version 1.17.0 of azure.azcollection and I am getting the same error of "KeyError: 'os_profile'". LOG on EE creation that indicates the installation of the azcollection versuib 1.17.0:
The error that appears to me is How can avoid this error? |
I have below version reference in
So irrespective of any EE, even if its a custom one, I believe you will have to control this within playbook project folder. If the version is not specified, it will override to use the latest available version which is |
I tried to build a new custom awx-EE with this collections:
but it appears the same error "KeyError: 'os_profile'" I don't understand why :( since at the end of August it was working correctly |
Based on this article, it's a limitation in Azure. The latest version of |
Fixes by #1301 |
SUMMARY
While attempting to perform any operation on a VM like stop, start or modify, it is failing with error
KeyError: 'os_profile'
for only some of the VMs whereos_profile
is not fetched under ansible_facts, but the same was working till we initiated a project sync in AWX this week. So unsure from which version ofazure.azcollection
resulted to throw this error.ISSUE TYPE
COMPONENT NAME
azure_rm_virtualmachine
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
AWX on K3S
STEPS TO REPRODUCE
Execute below task within a playbook after setting the right variables
EXPECTED RESULTS
The Azure VM should be stopped.
ACTUAL RESULTS
The VM is not stopped and throwing the error as below.
The text was updated successfully, but these errors were encountered: