1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

extended vmss facts (#45535)

This commit is contained in:
Zim Kalinowski 2018-09-12 13:22:47 +08:00 committed by Yunge Zhu
parent 0198d93f68
commit 111febe62e
2 changed files with 14 additions and 1 deletions

View file

@ -76,6 +76,12 @@ vmss:
returned: always
type: complex
contains:
id:
description:
- Resource ID
returned: always
type: str
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestGroup/providers/Microsoft.Compute/scalesets/myscaleset
admin_username:
description:
- Admin username used to access the host after it is created.
@ -218,6 +224,10 @@ vmss:
type: str
returned: always
sample: Standard_D4
tags:
description: Tags assigned to the resource. Dictionary of string:string pairs.
type: dict
sample: { "tag1": "abc" }
''' # NOQA
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
@ -323,6 +333,7 @@ class AzureRMVirtualMachineScaleSetFacts(AzureRMModuleBase):
data_disks[disk_index] = new_disk
updated = {
'id': vmss['id'],
'resource_group': self.resource_group,
'name': vmss['name'],
'state': 'present',
@ -341,7 +352,8 @@ class AzureRMVirtualMachineScaleSetFacts(AzureRMModuleBase):
'data_disks': data_disks,
'virtual_network_name': virtual_network_name,
'subnet_name': subnet_name,
'load_balancer': load_balancer_name
'load_balancer': load_balancer_name,
'tags': vmss.get('tags')
}
self.results['ansible_facts']['azure_vmss'][index] = updated

View file

@ -2,3 +2,4 @@ cloud/azure
shippable/azure/group4
destructive
disabled
azure_rm_virtualmachine_scaleset_facts