From b10859c19276f9c6f6ac807fb37b6b93ca795804 Mon Sep 17 00:00:00 2001 From: Brad Chamberlain Date: Mon, 27 Nov 2017 20:57:49 -0500 Subject: [PATCH] Adds missing url, public_ip_address, and port keys to cluster dict #33279 (#33288) Adds missing keys to _collect_facts function --- lib/ansible/modules/cloud/amazon/redshift.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/redshift.py b/lib/ansible/modules/cloud/amazon/redshift.py index ba82db85c6..f035d17505 100644 --- a/lib/ansible/modules/cloud/amazon/redshift.py +++ b/lib/ansible/modules/cloud/amazon/redshift.py @@ -244,11 +244,14 @@ def _collect_facts(resource): 'db_name' : resource['DBName'], 'availability_zone' : resource['AvailabilityZone'], 'maintenance_window': resource['PreferredMaintenanceWindow'], + 'url' : resource['Endpoint']['Address'], + 'port' : resource['Endpoint']['Port'] } for node in resource['ClusterNodes']: if node['NodeRole'] in ('SHARED', 'LEADER'): facts['private_ip_address'] = node['PrivateIPAddress'] + facts['public_ip_address'] = node['PublicIPAddress'] break return facts