community.aws
community.aws copied to clipboard
fix error in module iam_server_certificate for _compare_cert
SUMMARY
While using the module iam_server_certificate, I discovered that the module does not properly compare an existing certificate with the passed value. This happens because the str.replace method does not replace the variable in-place, but returns the string after replacement.
ISSUE TYPE
- Bugfix Pull Request
COMPONENT NAME
iam_server_certificate
ADDITIONAL INFORMATION
To reproduce the error, run the module or include it in a playbook. Assuming the module's arguments remain the same, the first run of the playbook will succeed. The second run will fail with the message "Modifying the certificate body is not supported by AWS". The expected result should be a success, not changed.
Build succeeded. https://ansible.softwarefactory-project.io/zuul/buildset/6b1b7d4f56dc4a6998d15667479dc96e
:x: ansible-galaxy-importer FAILURE in 4m 35s (non-voting) :heavy_check_mark: build-ansible-collection SUCCESS in 12m 39s :heavy_check_mark: ansible-test-splitter SUCCESS in 4m 57s :heavy_check_mark: integration-community.aws-1 SUCCESS in 5m 20s Skipped 21 jobs
@tremble Looking at the existing integration tests, I feel that they might already cover this.
Before making any changes, when attempting to run the integration tasks locally, I get an error...
I run:
$ ansible-test integration --docker
... and get ...
ERROR! couldn't resolve module/action 'community.crypto.openssl_privatekey'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/root/ansible_collections/community/aws/tests/output/.tmp/integration/acm_certificate-tfx8pg2l-ÅÑŚÌβŁÈ/tests/integration/targets/acm_certificate/tasks/main.yml': line 51, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
This is using commit 9c66d1e4 -- Bump release for main branch to 9.0.0-dev0 (#2091)