mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fixes #39648 azure_rm_virtualnetwork not handling DNS settings properly on existing virtual networks (#40646)
* check nullable * add test * fix * fix
This commit is contained in:
parent
dde48560fb
commit
7b9864776a
2 changed files with 12 additions and 1 deletions
|
@ -257,7 +257,7 @@ class AzureRMVirtualNetwork(AzureRMModuleBase):
|
|||
changed = True
|
||||
|
||||
if self.dns_servers:
|
||||
existing_dns_set = set(vnet.dhcp_options.dns_servers)
|
||||
existing_dns_set = set(vnet.dhcp_options.dns_servers) if vnet.dhcp_options else set([])
|
||||
requested_dns_set = set(self.dns_servers)
|
||||
if existing_dns_set != requested_dns_set:
|
||||
self.log('CHANGED: replacing DNS servers')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue