Skip to content

Commit

Permalink
tests/acm_certificate: retries a aws_acm_info if needed (ansible-coll…
Browse files Browse the repository at this point in the history
…ections#1473)

tests/acm_certificate: retries aws_acm_info called when needed

The aws_acm_info may return an empty list if a certificate has just been recreated (race condition). We now retry 3 times until we've got a list.

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@c7510c2
  • Loading branch information
goneri authored and abikouo committed Oct 26, 2023
1 parent 84afd5b commit 29a60e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/targets/acm_certificate/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@
tags:
Name: '{{ chained_cert.name }}'
register: check_chain
until: check_chain.certificates|length > 0
retries: 3
- name: check chain of cert we just uploaded
assert:
that:
Expand Down Expand Up @@ -545,6 +547,8 @@
tags:
Name: '{{ chained_cert.name }}'
register: check_chain_2
until: check_chain_2.certificates|length > 0
retries: 3
- name: check chain of cert we just uploaded
assert:
that:
Expand Down

0 comments on commit 29a60e2

Please sign in to comment.