diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py index c4dadf540e..596bd486e3 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py @@ -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 diff --git a/test/integration/targets/azure_rm_virtualmachine_scaleset/aliases b/test/integration/targets/azure_rm_virtualmachine_scaleset/aliases index 60bea7bcb8..d110ebff56 100644 --- a/test/integration/targets/azure_rm_virtualmachine_scaleset/aliases +++ b/test/integration/targets/azure_rm_virtualmachine_scaleset/aliases @@ -2,3 +2,4 @@ cloud/azure shippable/azure/group4 destructive disabled +azure_rm_virtualmachine_scaleset_facts