-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: modifying existing application lb using certificates now properl… #28217
Conversation
…y sets certificates
Can you better explain the problem please? Did the module fail or were the results unexpected? |
When modifying an existing application LB that has a certificate set for HTTPS connection, the script raised an exception Example:
This will eventually call Sorry for not explaining it better in the summary. Hope this helps. |
@@ -538,9 +538,13 @@ def compare_listener(current_listener, new_listener): | |||
if current_listener['SslPolicy'] != new_listener['SslPolicy']: | |||
modified_listener['SslPolicy'] = new_listener['SslPolicy'] | |||
if current_listener['Certificates'][0]['CertificateArn'] != new_listener['Certificates'][0]['CertificateArn']: | |||
modified_listener['Certificates'] = [] | |||
modified_listener['Certificates'].append({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just do something like modified_listener['Certificates'] = [{'CertificateArn': new_listener['Certificates'][0]['CertificateArn']}]
rather than making it an empty list and appending an empty dict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that it's the same as done elsewhere in the module though. Fine as-is.
@wimnat This fix makes sense to me. Basically the same as what's happening on line 549-551: https://github.com/ansible/ansible/pull/28217/files#diff-a1bcebad578f0e6bfd841049d327a587L549 |
Yep i'm ok with it shipit |
…y sets certificates (ansible#28217)
…y sets certificates (ansible#28217) (cherry picked from commit 3bd89f8)
…y sets certificates
SUMMARY
Fixed an issue where modifying an existing application load balancer fails because certificates are not copied to a new dictionary correctly.
ISSUE TYPE
COMPONENT NAME
lib/ansible/modules/cloud/amazon/elb_application_lb.py
ANSIBLE VERSION