From 0c5eac4243382a1ed59e75b533bca8e3343dd12a Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Thu, 26 May 2016 11:48:58 -0400 Subject: [PATCH] Fix missing key error when updating existing virtual network. --- lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py index d53fad139ab..9f1e7e61f23 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py @@ -333,7 +333,7 @@ class AzureRMVirtualNetwork(AzureRMModuleBase): ), tags=results['tags'] ) - if results['dns_servers']: + if results.get('dns_servers'): vnet.dhcp_options = DhcpOptions( dns_servers=results['dns_servers'] )