From 731fc288fa700cb7e90a2c33ebba7b00ca28cf56 Mon Sep 17 00:00:00 2001 From: Patrick Marques Date: Wed, 12 Apr 2017 18:58:57 +0100 Subject: [PATCH] fixes #4441 passing subnet_name parameter (#18920) --- lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py index 053a103cea8..a721d45097e 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py @@ -1243,7 +1243,7 @@ class AzureRMVirtualMachine(AzureRMModuleBase): if self.subnet_name: try: - subnet = self.network_client.subnets.get(self.resource_group, virtual_network_name) + subnet = self.network_client.subnets.get(self.resource_group, virtual_network_name, self.subnet_name) subnet_id = subnet.id except Exception as exc: self.fail("Error: fetching subnet {0} - {1}".format(self.subnet_name, str(exc)))