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

elb_target_group: use port parameter as default for target port (#38578)

The docs suggest that `port` parameter is the default port upon
which targets listen. As such, a target need only provide a `Port`
key to override the default.
This commit is contained in:
Will Thames 2018-04-19 03:19:54 +10:00 committed by ansibot
parent 8cdd75a09f
commit dc09ddfbd5

View file

@ -502,7 +502,7 @@ def create_or_update_target_group(connection, module):
instances_to_add = [] instances_to_add = []
for target in params['Targets']: for target in params['Targets']:
if target['Id'] in add_instances: if target['Id'] in add_instances:
instances_to_add.append({'Id': target['Id'], 'Port': int(target['Port'])}) instances_to_add.append({'Id': target['Id'], 'Port': int(target.get('Port', module.params.get('port')))})
changed = True changed = True
try: try: