Skip to content
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

Return idenity information in the azure_rm_virtualmachine_info.py module #1674

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions plugins/modules/azure_rm_virtualmachine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,22 @@
returned: always
type: str
sample: running
idenity:
description:
- The identity of the virtual machine.
type: dict
returned: always
sample: {
"principal_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "SystemAssigned, UserAssigned",
"user_assigned_identities": {
"/subscriptions/xxx/resourceGroups/testRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test": {
"client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"principal_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
}
security_profile:
description:
- Specifies the Security related profile settings for the virtual machine.
Expand Down Expand Up @@ -508,6 +524,7 @@ def serialize_vm(self, vm):
new_result['proximityPlacementGroup'] = result.get('proximity_placement_group')
new_result['zones'] = result.get('zones', None)
new_result['additional_capabilities'] = result.get('additional_capabilities')
new_result['idenity'] = result.get('identity')
new_result['capacity_reservation'] = dict()
if result.get('capacity_reservation') is not None:
new_result['capacity_reservation']['capacity_reservation_group'] = result.get('capacity_reservation').as_dict()
Expand Down