ec2_vpc_dhcp_options_facts: if tags don't exist set them to default list instead of crashing - fixes #23825 (#23967)
* if tags don't exist set them to an empty list * dhcp_option will always have a name tag * make requested change
This commit is contained in:
parent
0154f32fbd
commit
338bf0fd3f
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ except ImportError:
|
||||||
def get_dhcp_options_info(dhcp_option):
|
def get_dhcp_options_info(dhcp_option):
|
||||||
dhcp_option_info = {'DhcpOptionsId': dhcp_option['DhcpOptionsId'],
|
dhcp_option_info = {'DhcpOptionsId': dhcp_option['DhcpOptionsId'],
|
||||||
'DhcpConfigurations': dhcp_option['DhcpConfigurations'],
|
'DhcpConfigurations': dhcp_option['DhcpConfigurations'],
|
||||||
'Tags': boto3_tag_list_to_ansible_dict(dhcp_option['Tags'])}
|
'Tags': boto3_tag_list_to_ansible_dict(dhcp_option.get('Tags', [{'Value': '', 'Key': 'Name'}]))}
|
||||||
return dhcp_option_info
|
return dhcp_option_info
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue