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
Fixes python keyerror if no port is specified and default should be used #34662
Conversation
Closing and re-opening for CI trigger. |
The port is already defaulted https://github.com/grumpymatt/ansible/blob/4e4ea2508c65e2bfb7b4920ccb7e40d2f16cfc86/lib/ansible/module_utils/vmware.py#L440 and the key "port" does exist. I wonder if the error is related to a module not using the common arg spec. |
@resmo You are correct. I didn't realize we had a custom module using vmware.py and it was the one throwing the error. We have not updated it to the latest arg spec. |
I updated my custom module and it works now without this change. I think perhaps line 449 could still be updated since the port is specified elsewhere. Maybe a better change would be to remove the 'or 443'? |
superseded by #37726 |
SUMMARY
Received python keyerror when port value was missing. Used python dict get method to properly default the port value
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ADDITIONAL INFORMATION