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

Fix if the route table changed to none (#49533)

This commit is contained in:
Yuwei Zhou 2018-12-10 10:30:23 +08:00 committed by Zim Kalinowski
parent c0d95a73ff
commit 5a59748e6c

View file

@ -241,6 +241,7 @@ class AzureRMSubnet(AzureRMModuleBase):
if self.security_group:
nsg = self.parse_nsg()
route_table = dict()
if self.route_table:
route_table = self.parse_resource_to_dict(self.route_table)
self.route_table = format_resource_id(val=route_table['name'],
@ -276,7 +277,7 @@ class AzureRMSubnet(AzureRMModuleBase):
if self.route_table != results['route_table'].get('id'):
changed = True
results['route_table']['id'] = self.route_table
self.log("CHANGED: subnet {0} route_table to {1}".format(self.name, route_table['name']))
self.log("CHANGED: subnet {0} route_table to {1}".format(self.name, route_table.get('name')))
if self.service_endpoints:
oldd = {}