mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
This commit is contained in:
parent
b98e94df8f
commit
52c8a28ac9
2 changed files with 57 additions and 27 deletions
|
@ -270,7 +270,7 @@ class AzureRMContainerInstanceFacts(AzureRMModuleBase):
|
|||
def format_item(self, item):
|
||||
d = item.as_dict()
|
||||
containers = d['containers']
|
||||
ports = d['ip_address']['ports']
|
||||
ports = d['ip_address']['ports'] if 'ip_address' in d else []
|
||||
resource_group = d['id'].split('resourceGroups/')[1].split('/')[0]
|
||||
|
||||
for port_index in range(len(ports)):
|
||||
|
@ -296,8 +296,8 @@ class AzureRMContainerInstanceFacts(AzureRMModuleBase):
|
|||
'resource_group': resource_group,
|
||||
'name': d['name'],
|
||||
'os_type': d['os_type'],
|
||||
'ip_address': 'public' if d['ip_address']['type'] == 'Public' else 'none',
|
||||
'dns_name_label': d['ip_address'].get('dns_name_label'),
|
||||
'ip_address': d['ip_address']['ip'] if 'ip_address' in d else '',
|
||||
'ports': ports,
|
||||
'location': d['location'],
|
||||
'containers': containers,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue